Help for mathematical equation of regression in ANN
1 view (last 30 days)
Show older comments
With ANN toolbox, I am using neural networks for finding the regression equation.
for info, I am using Bayesian regularization with 4 variables of 30 different samples and 30 results.
Is there a way of finding the mathematical equation of that in ANN?
Thanks..
0 Comments
Accepted Answer
Greg Heath
on 16 May 2012
This question has been asked many times in both the Newsgroup and Answers. If you do not use the default normalizations of input and output,
h = tansig(IW*x+b1);
y = purelin(LW*h+b2);
Otherwise you have to use the default mapminmax or alternative mapstd on x,t and y.
You can obtain details by searching on the equation for h in the Newgroup and Answers.
Hope this helps.
Greg
More Answers (4)
Greg Heath
on 16 May 2012
hiddenLayerSize = 30;
1. TOO LARGE AND INCOMPATIBLE WITH NEXT COMMAND
net = newff(minmax(input),[1 10],{'tansig' 'purelin'},'trainbr');
2. a. OBSOLETE. WHAT VERSION OF MATAB AND NNTBX DO YOU HAVE?
2.b. INCORRECT NODE SIZE ASSIGNNMENT SYNTAX
net.IW{1}
net.b{1,1}
3. ASSIGN WEIGHTS TO IW, LW
h=tansig(IW*inputs+b1)
targets=purelin(LW*h+b2)
4. TERMINATE THIS AND OTHER VOLUMINOUS OUTPUT COMMANDS WITH SEMICOLONS
net.inputs{1}.processFcns = {'removeconstantrows','mapminmax'};
net.outputs{2}.processFcns = {'removeconstantrows','mapminmax'};
net.divideFcn = 'dividerand'; % Divide data randomly
net.divideMode = 'sample'; % Divide up every sample
4. LAST FOUR ARE DEFAULTS: DELETE
net.divideParam.valRatio = 15/100;
5. WHY ARE YOU USING A VALIDATION SET WITH TRAINBR?
net.trainFcn = 'trainbr'; % Bayesian Regularization
6. WHY ARE YOU USING TRAINBR INSTEAD OF DEFAULT TRAINLM?
net.performFcn = 'mse'; % Mean squared error
7. MSE INCOMPATIBLE WITH TRAINBR SEE DOCUMENTATION
net.plotFcns = {'plotperform','plottrainstate','ploterrhist', ...
'plotregression', 'plotfit'};
8. NOT SURE IF THESE ARE COMPATIBLE WITH YOUR OBSOLETE VERSION OF NEWFF
perf = msereg(errors,outputs,X,FP);
dy = msereg('dy',errors,outputs,X,perf,FP);
dx = msereg('dx',errors,outputs,X,perf,FP);
info = msereg(code);
net.performParam.ratio = 20/(20+1);
perf = msereg(e,net);
9. I HAVE NO IDEA WHAT YOU ARE DOING HERE. YOU NEVER USED MSEREG FOR LEARNING
HOPE THIS HELPS.
GREG
0 Comments
See Also
Categories
Find more on Sequence and Numeric Feature Data Workflows 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!