0
我正在使用neuralnet
包。R神經網絡:神經元錯誤[[i]]%*%權重[[i]]:需要數值/複數矩陣/向量參數
我可以用訓練:
neural <- neuralnet(pricelb ~ eight + three + length + diameter + thread,
cleaned, hidden=10, threshold=0.01)`
所有這些都是數字的功能,我是雙str(cleaned)
然而檢查,當我去預測:
prediction <- compute(neural, cleanedtwo)
我得到以下錯誤:
Error in neurons[[i]] %*% weights[[i]] : requires numeric/complex matrix/vector arguments`
看起來通常這是因爲使用了非數字值,但是我已經檢查過,訓練中的所有屬性以及測試集中的相同屬性都是數字。
如果數據框中還有其他因子屬性已清理/清理過,即使它們未用於培訓,是否存在問題?
編輯:也有不缺少/ NA值
你能提供'STR(cleanedtwo)的輸出'? – cdeterman
沒有回答解決問題了嗎?如果沒有,請展開你的問題。 – cdeterman