Non-standard equipment

The problem that I encountered after trying to create neural networks is not new: the set values ​​that I get are the same. Here is an example of simplified code:

a <- c( 123, 223, 234, 226, 60) b <- c(60, 90, 53, 54, 91) d <- c(40,100,207,290,241) q <- cbind(a,b,d) nn <- neuralnet(a~b+d,data=q,hidden=2,threshold=0.01,err.fc="sse") nn$net.result` 

Previous Answers I came across a suggestion to use nnet instead. I get the same results, although if I did not set the decay argument to a value other than 0. Instead of blindly using the decay parameter, simply because it seems to “work”, though, I would appreciate an understanding of what went wrong with my neural network to begin with.

+4
source share
1 answer

So, after playing with my original dataset using both neuralnet and nnet , I found out what the problem is. This is about randomly selected starting weights. The range of values ​​that neuralnet assigns to them leads to this strange decision. However, when I tried to use the startweights operator to manually set the initial weights to the values ​​obtained from nnet (which returned the corresponding set values ​​there), I received an "algorithm did not converge" error. Therefore, I think I just need to give up neuralnet schedules and stick with nnet .

+3
source

Source: https://habr.com/ru/post/1347354/


All Articles