about the hidden and output layers

2 views (last 30 days)
Hello everyone,
I have built a couple of operative neural networks: a feed-forward BackPropagation and a cascade-forward backpropagation. Now I'd like to make an excel sheet, in which I introduce new inputs and I get the output.
To do that I've got the weights and the bias of my NN. I also have the codification of my inputs, I mean: I have 5 inputs with different units (no units, density, pressure...) and are codified between [-1, 1] (like the mapminmax). Also for the outputs.
So now I want to introduce in my sheet the new data, multiply them with the weights, adding the bias and get my output.
The problem is that the operation that the NN do is:
output= purelin(w2*tansig(Input*w1+b1)+b2).
purelin is: -1 if x<-1.
ax if -1<x<1; where a is a positive constant.
1 if x>1.
tansig is an exponential function e^cx-e^-cx/e^cx+e^-cx (or something like that) with c a constant.
My question is if it's possible to get those constants in order to add them to my excel sheet.
If the answer is no, I would like to know if it's possible to run my program without MATLAB. My input data are loaded with the command "load". Would I have to load the input "manually" in this case or would it keep those data.
I hope I have been clear in my question.
Thank you in advance

Accepted Answer

Greg Heath
Greg Heath on 3 Jun 2013
Very incorrect.
purelin(x) = x
tansig(y) = tanh(y)
Therefore
output = purelin( b2 + W2*tansig( b1 + W1*input ));
output = b2 + W2*tanh( b1 + W1*input );
You can get the weights via
Wb = getwb(net);
WARNING: The formula in help getwb and doc getwb is incorrect
WARNING: I have not checked the corresponding help/doc info in formwb , separatewb and setwb
Hope this helps.
Thank you for formally accepting my answer
Greg

More Answers (0)

Community Treasure Hunt

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

Start Hunting!