需要帮助了解触发“ncol.matrix < rep”错误的原因。
我浏览了神经网络https://rdrr.io/cran/neuralnet/src/R/neuralnet.r的源代码,还调整了我的神经网络函数的参数,但我似乎无法阻止这个错误的发生. 我不确定是否已经发布了这样的问题,但我找不到任何解决方案,所以,如果有人以前看过这样的问题,您能否将我链接到解决方案。
我还标准化了“WicketPerInnings”的目标列
Wnn <- neuralnet(
WicketFormula,
WTrain,
algorithm = "rprop+",
hidden = c(4,2),
stepmax = 1e+03,
threshold = 0.2,
rep = 40,
lifesign = 'full',
learningrate = 0.01,
startweights = NULL,
err.fct = "sse",
linear.output = TRUE
)
WicketFormula <-
"WicketPerInnings~ world_cup_matches+No_of_Matches + No_of_Innings_bowled+No_of_Balls_bowled + No_of_Runs_given+No_of_Wickets + Bowling_Ave + Economy_rate+Bowling_Strike_Rate + Span"
Run Code Online (Sandbox Code Playgroud)
str(WTrain) 给出
$ Country : chr "Sri Lanka" "Bangladesh" "South Africa" "India" ...
$ world_cup_matches : num 2 1 0 0 9 …Run Code Online (Sandbox Code Playgroud)