Regression function of Neural Networks

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 comentarios

Greg Heath
Greg Heath el 12 de Mayo de 2012
"The regression of the variables" is not a familiar term.
Please explain exactly what you mean.
Greg
Greg Heath
Greg Heath el 12 de Mayo de 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
b el 13 de Mayo de 2012
I meant regression function of my variables. I could not find this.
I have to use bayesian regularization(trainbr) for my variables.
how can i do this?
Greg Heath
Greg Heath el 13 de Mayo de 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
b el 14 de Mayo de 2012
Actually, yes.
I need the mathematical equation of regression.
How can i find that?
Thanks

Iniciar sesión para comentar.

 Respuesta aceptada

Greg Heath
Greg Heath el 15 de Mayo de 2012

0 votos

In general, there is no way to get "the function for each variable".
If you vary one variable with all of the other variables fixed, the result depends on the particular combination of the fixed values.
There are N combinations of I-dimensional input data. If you take each input vector, hold I-1 variables fixed and vary the remaining one over it's range, you would get N different functions for that single variable. Plotting those N functions on one plot would probably not yield enough visual information to make it worthwhile. Doing this for each variable would probably not be very enlightning.
However, there are ways to estimate the relative importance of each variable. For example, you can scramble the N values of a single variable and record the resulting error. Repeat this a number (10?,20?,30?) of times and record the summary statistics (e.g., min/median/mean/std/max) of the MSE.
The ranking of the I means and medians of the variables should yield a reasonable understanding of the importance of each variable.Hope this helps.
Greg

Más respuestas (2)

Ketan
Ketan el 12 de Mayo de 2012
You can view the general structure of your network with the VIEW function:
view(net);
The IW, LW, and b Network properties store the weights and biases.

1 comentario

b
b el 13 de Mayo de 2012
I have these but in ANN, there should be a code for the regression function of variables. I actually need this code or etc.

Iniciar sesión para comentar.

Greg Heath
Greg Heath el 13 de Mayo de 2012

0 votos

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 comentario

b
b el 13 de Mayo de 2012
I changed my code to "net."
I have a regression shown in NN figure as approximately 0.7
But i could not get the function for each variable.
Thanks..

Iniciar sesión para comentar.

Categorías

Más información sobre Deep Learning Toolbox en Centro de ayuda y File Exchange.

Preguntada:

b
b
el 11 de Mayo de 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by