I used nnet function in R to train the neural network.but when i want to predict the output variable in test data, it returns all 1? why it happens? Thanks
I think something wrong in your code. It is better to debug your ANN code step by step and compare the output of each neuron with the output you calculate manually to see where the problem is.
Cam you briefly explain the problem. If the Ann is stopping early it means that the inputs and outputs are well related and you may use regression analysis for solving such problem as neural networks are nothing but nonlinear statistical tools.
Thank you Vinay, I have 7 input variables and 1 output variable. I want to use neural network to predict the output variable. I performed nnet function in R. the code and the response is such as below:
Why you have soo huge initial weight value? Have you normalize your input values of your ANN to be in some rang, for example between [0-1] or [0-100], and then initial smaller value of weights, for example [-10,10]. That might be helpful.
Thanks a lot Min, It was a good point. but i have 4 dummy variables such as salery.day.effect, off.day.effect, week.dat and work.day. can i normalized them either?
sorry, i did not get it. You mean, i should normalize just the variables with large values or all of them ( including dummy variables)? and i should normalize each column of variables?
MATLAB HAS INBUILT FUNCTIONS FOR NORMALIZATION OF DATA. BUT THAT WOULD NOT DO ANY GOOD BECAUSE YOUR TRAINING DATA IS SIMILAR TO TESTING DATA, HENCE R=1. TRY USING RANDOMIZED DATA AND SEE THE RESULTS.