Старайтесь, чтобы вы никогда не устанавливали startweights
в функции neuralnet()
. Согласно документации
neuralnet(formula, data, hidden = 1, threshold = 0.01,
stepmax = 1e+05, rep = 1, startweights = NULL,
learningrate.limit = NULL,
learningrate.factor = list(minus = 0.5, plus = 1.2),
learningrate=NULL, lifesign = "none",
lifesign.step = 1000, algorithm = "rprop+",
err.fct = "sse", act.fct = "logistic",
linear.output = TRUE, exclude = NULL,
constant.weights = NULL, likelihood = FALSE)
startweights a vector containing starting values for the weights. The weights will not be randomly initialized.
Обратите внимание, что значение по умолчанию NULL, и оно НЕ будет инициализировано случайным образом. Попытайтесь что-то там положить и посмотрите, работает ли это.