cbind(1,pred)%*%weights [[num_hidden_​​layers + 1]]中的错误:需要数字/复杂矩阵/矢量参数

时间:2019-06-03 13:07:16

标签: r

我正在开发WANN模型并尝试预测流量。我正在使用以下代码...

WaveletForecast<-WaveletFittingann(ts=file, Waveletlevels=2, boundary='periodic',FastFlag=TRUE,nonseaslag,seaslag,NForecast=5)
file2 = as.data.frame(cbind(dw_SF_test@series,dw_temp_test@series,dw_ppt_test@series))

names(file2) = c('streamflow', 'temperature', 'precipitation')
WANN<- as.matrix(WaveletForecast)

c = compute(WANN, file2[,c(2,3)])
h = data.frame(actual = file2$V1, pred = c)

plot(h$actual, h$pred.net.result)

k = lm(h$actual~h$pred.net.result)
summary(k)

Error in cbind(1, pred) %*% weights[[num_hidden_layers + 1]] : 
  requires numeric/complex matrix/vector arguments

0 个答案:

没有答案