How can I customize the NARX neural network Input and Feedback Pre/Post-Processing Functions?
4 views (last 30 days)
Show older comments
Hi,
I am new to neural networks. I have 1 target and 4 external inputs and I need to customize the NARX neural network Input and Feedback Pre/Post-Processing Functions so as to map onto the range [0.2 0.8] instead of the default [-1 1]. How can I modify these two lines in my script, and what else can I do?
net.inputs{1}.processFcns = {'removeconstantrows','mapminmax'};
net.inputs{2}.processFcns = {'removeconstantrows','mapminmax'};
Thanks.
0 Comments
Accepted Answer
Greg Heath
on 30 Oct 2012
Why do you thin you "need" to do this transformation??
MAPMINMAX is designed to scale internal inputs, targets and outputs into a range that doesn't unnecessarily cause numerical innaccuracy in training function Jacobians or saturate sigmoid activation functions.
Changing from [-1,1] to something else does absolutely nothing useful.
The change of code is an unecessary complication that does nothing to improve the accuracy of the net.
Or am I missing something?
Hope this helps.
Thank you for formally accepting my answer (;>)
Greg
0 Comments
More Answers (1)
Sree Srinivasan
on 11 Oct 2012
I posed your question to the authors of Matlab ANN. Here is a response. It makes sense, but I have not tested it.
The MAPMINMAX output range can be set to 0.2 to 0.8 as follows:
net.inputs{1}.processFcns = {'removeconstantrows','mapminmax'}; net.inputs{1}.processParams{2} = struct('ymin',0.1,'ymax',0.9);
Let me know if that does not accomplish what you are trying to do.
Both network input and output subobjects have the processParams field so the output's MAPMINMAX can be customized to map targets to layer output ranges other than [-1,1] also. For instance for a two-layer network where MAPMINMAX is the second processing function:
net.outputs{2}.processParams{2} = struct('ymin',0.2,'ymax',0.8);
0 Comments
See Also
Categories
Find more on Modeling and Prediction with NARX and Time-Delay Networks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!