Dear_jenny
Dear_jenny
2017-09-30 02:59

R BP神经网络建模报错

  • r语言
  • 神经网络

data_ys <- read.csv("q345.csv",header = TRUE,fill = TRUE, sep = ",")
norm.data <- scale(data_ys,center = TRUE,scale = TRUE)
set.seed(1)
sample_Index <- createDataPartition(y=norm.data[,5], p=0.7,list= FALSE)
train_data <- as.data.frame(norm.data[sample_Index,])
test_data <- as.data.frame(norm.data[-sample_Index,])
net <- newff(n.neurons = c(4,3,1), learning.rate.global = 1e-2, momentum.global = 0.5,
error.criterium = "LMS", Stao = NA, hidden.layer = "tansig",
output.layer = "purelin", method = "ADAPTgdwm")
model <- train(net, train_data[1:4], train_data[5], Pval = NULL,
error.criterium = "LMS", report = TRUE,
n.shows = 5, show.step = 100)
Error: Please use column names for x
运行到train函数报错,刚刚开始学习R建模,不知道怎么解决啦,大神们帮帮忙吧,感谢!

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答

为你推荐

换一换