Discrete regression plot of neural networks in matlab
8 views (last 30 days)
Show older comments
Hi, I have 31 inputs, and 11 output. 600 sample size. Every output has 3 levels' value (high value, medicate value and low value).I used NNs fitting to predict the output.The regression diagram turns out to be like the pic1.However, when I changed the output function to be logistic function, it turns out to be pic2. I wonder if the transfer function can help to transfer the discrete values into continuous? It really doesn't matter with layers of NNs, number of neurons and ratio of training data, as I tried many combination of them. Except for the logistic function for output layer shows in pic2, others are showed similar as pic1. Also, I tried pattern recognition. However, my outputs are too many, 11 * 3. I cannot get the good confusion plot. Any suggestion with this problem? Should I go with the fitting or pattern recognition? Thank you.
2 Comments
Greg Heath
on 29 Nov 2014
When the output transfer function was purelin, what 3 numerical target values are associated with high, medium (note spelling) and low?
I am confused: You have more than 3 target values on your plots
Which logistic output function did you use? tansig or logsig? What 3 values?
More explanation is needed. Especially the syntax of the target matrix.
Accepted Answer
Greg Heath
on 18 Dec 2014
My understanding is that you have 600 examples with 31 continous inputs and 11 discrete outputs. Each discrete output has 3 levels.
I suggest transforming each input to the continuous range [-1,1] and each output to have the discrete values {-1,0,1}.
With the default 0.7/0.15/0.15 fitnet data division, the number of training examples and equations is
Ntrn = 600-2*round(0.15*600) = 420
Ntrneq = Ntrn*11 = 4620
With a 31-H-11 topology the number of weights is
Nw = (31+1)*H+(H+1)*11= 43*H+11
For a robust design the criterion Ntrneq >> Nw yields
H << 107
I would start by obtaining ~100 candidate nets with a double loop design of 10 random weight initializations for each of h = 5:5:50 values for the number of hidden nodes.
tansig/purelin should be sufficient. Rounding the output should recover { -1,0,1}
Hope this helps.
Thank you for formerly accepting my answer
Greg
2 Comments
salah mahdi
on 19 Jan 2016
Hi Greg Heath, Many thanks for your effort.
Do you have any reference we can use for your suggestion (I suggest transforming each input to the continuous range [-1,1] and each output to have the discrete values {-1,0,1}.)
More Answers (1)
Greg Heath
on 17 Dec 2014
Scale all 11 targets to 3 discrete values -1,0,1
Use purelin and round the outputs
Hope this helps.
Thank you for formerly accepting my answer
Greg
2 Comments
Greg Heath
on 20 Jan 2016
Why don't you just use te classifier function patternnet with 3 dimensional outputs from the columns of the 3-dimensional {0,1} unit matrix eye(3).
See Also
Categories
Find more on Define Shallow Neural Network Architectures in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!