I'm tring to use neuralnet for prediction.
Create some X:
x <- cbind(seq(1, 50, 1), seq(51, 100, 1))
Create Y:
y <- x[,1]*x[,2]
Give them a names
colnames(x) <- c('x1', 'x2')
names(y) <- 'y'
Make data.frame:
dt <- data.frame(x, y)
And now, I got error
model <- neuralnet(y~., dt, hidden=10, threshold=0.01)
error in terms.formula(formula) : '.' in formula and no 'data'
argument
For example, in lm(linear model) this is worked.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…