Regression function of Neural Networks
Afficher commentaires plus anciens
I wrote a code for neural network for my project but, i could not find the regression function as a result. My code is;
inputs = initial1';
targets = output';
hiddenLayerSize = 6;
net = fitnet(hiddenLayerSize);
net.inputs{1}.processFcns = {'removeconstantrows','mapminmax'};
net.outputs{2}.processFcns = {'removeconstantrows','mapminmax'};
net.divideFcn = 'dividerand';
net.divideMode = 'sample';
samplenet.divideParam.trainRatio = 80/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 5/100;
net.trainFcn = 'trainbr'; % Bayesian regularization
net.performFcn = 'mse'; % Mean squared error
net.plotFcns = {'plotperform','plottrainstate','ploterrhist', ...
'plotregression', 'plotfit'};
[net,tr] = train(net,inputs,targets);
outputs = net(inputs);
errors = gsubtract(targets,outputs);
performance = perform(net,targets,outputs)
- My network is running without an error. but Could not find the regression of the variables.
5 commentaires
Greg Heath
le 12 Mai 2012
"The regression of the variables" is not a familiar term.
Please explain exactly what you mean.
Greg
Greg Heath
le 12 Mai 2012
>samplenet.divideParam.trainRatio = 80/100;
>net.divideParam.valRatio = 15/100;
>net.divideParam.testRatio = 5/100;
Change samplenet to net.
>net.trainFcn = 'trainbr'; % Bayesian regularization
>net.performFcn = 'mse'; % Mean squared error
trainlm uses mse
trainbr uses msereg
Hope this helps.
Greg
b
le 13 Mai 2012
Greg Heath
le 13 Mai 2012
I still do not know what you mean.
Are you looking for the mathematical equation that produces the same output as the net?
Greg
b
le 14 Mai 2012
Réponse acceptée
Plus de réponses (2)
Greg Heath
le 13 Mai 2012
0 votes
See my answer in the recent Answers post titled:
Write code for NN using the Weight and Bias data retrieved from the NN tool box
Hope this helps.
Greg
1 commentaire
b
le 13 Mai 2012
Catégories
En savoir plus sur Deep Learning Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!