Help for mathematical equation of regression in ANN
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Greg Heath
2012-5-16
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
更多回答(4 个)
Greg Heath
2012-5-16
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sequence and Numeric Feature Data Workflows 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!