nnet_f1 <-
nnet(Z24train$f1~Z24train$TSU+Z24train$TSL+Z24train$TW+Z24train$TP,size=10,linout=T)
plot(Z24$datahora,Z24$f1,col=1,xlab="time", ylab ="f(Hz)",pch="x")
legend("topright","1stMode",text.col=1,bty="n")
lines(Z24train$datahora[complete.cases(Z24train$datahora)],nnet_f1$fitted.values,col="blue",pch="x")
predict <- predict(nnet_f1, newdata = Z24test)
> predict <- predict(nnet_f1, newdata = Z24test)
Error in predict.nnet(nnet_f1, newdata = Z24test) :
NAs are not allowed in subscripted assignments
另外:警告信息: 'newdata'有282行,但找到的变量有3315行
我的功能预测有问题。你能帮助我吗? 我的数据分为两组,训练和测试。现在我想找到数据测试的函数预测。谢谢