我正在尝试使用RSNNS软件包来安装RBF网络, 这是我的代码:
Thisworkbook.worksheets("name of your sheet").Row(lrow2).Insert shift:=xldown, CopyOrigin:=xlFormatFromLeftOrAbove.
当我跑线时:
library(Rcpp)
library(RSNNS)
library(mlbench)
data("BreastCancer")
BreastWithoutNA<- na.omit(BreastCancer)
inputs <- BreastWithoutNA[, 2:10]
outputs <- decodeClassLabels(BreastWithoutNA[,11],valTrue = 0.9,valFalse = 0.1)
model <- rbf(inputs, outputs, size=40, maxit=1000,
initFuncParams=c(0, 1, 0, 0.01, 0.01),
learnFuncParams=c(1e-8, 0, 1e-8, 0.1, 0.8), linOut=TRUE)
我收到以下错误:
model <- rbf(inputs, outputs, size=40, maxit=1000,
initFuncParams=c(0, 1, 0, 0.01, 0.01),
learnFuncParams=c(1e-8, 0, 1e-8, 0.1, 0.8), linOut=TRUE)
是的,有人可以帮助我吗?
的问候,
答案 0 :(得分:0)
问题是mlp的输入需要是一个数字矩阵。您可以查看is.numeric(as.matrix(inputs))
您的输入不是数字,实际上它是字符串。您需要转换输入。