why does I-H-O neural network predict constant values?

my neural network was working reasonably, except for the prediction of negative values sometimes which is impossible physically since I am trying to predict concentrations in the sewer system based on 5 relevant parameters. Therefore, I tried the suggestion proposed by Greg in the following thread:
namely "Use 'tansig' for hidden and 'logsig' for output."
however, when I implement this, all the predicted values go to a constant value (which is about halve of the maximum) and the optimizaion process stops. I thought it might be a problem of rescaling my data (maximum is now around 300), but after rescaling such that the maximum is one, the problem still remains, now converging all results to 0.5
what am I doing wrong? Is there another possibility of making sure my NN does not predict negative values?
hiddenLayerSize = 20;
net = fitnet(hiddenLayerSize);
net.layers{1}.transferFcn = 'tansig'; % hidden layer
net.layers{2}.transferFcn = 'logsig'; % output layer
[net,tr] = train(net,inputs,targets);

5 Comments

What is
minmaxxt = minmax([ input; target])
this gives
1.0000 12.0000
1.0000 7.0000
0.0011 0.0712
0.0018 0.0712
0.0018 0.0712
0 22.7000
0 3.4508
3.0000 656.0000
for the non rescaled targets, I tried rescaling the targets so then the last line gives 0 - 1 but this did not provide any improvement
I have been searching the previous answers on neural networks extensively and have tried to use mapminmax on both my inputs and targets to see if I can get an improvement. When I do this, all my predicted output falls within the range -0.52 to -0.18. Can anyone explain to me how this can be caused? And more importantly how it can be solved
still nobody that has an idea on how to solve this? The problem is still persisting and I really would have liked to have a working NN in my results...
Insufficient information.
Post your code (your data in *.m or *.txt would also help)

Sign in to comment.

Answers (0)

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Asked:

on 25 Feb 2015

Commented:

on 31 Jul 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!