Obtaining neural network formula
Show older comments
Hi, I'm trying to obtain the formula from neural network using a linear simple case:
F = [-9 1 2 3 4 5 6 7 8 9 10 30 60];%neural network input
T = F*3+1; %target
net = newff(F, T,[],{},'traingdx');
net1 = train(net,F,T,[],[]);
x = 5; %new input
y = sim(net1,x); %ann output ~= 16;
%now i'm trying to obtain the formula from NN:
IW = net1.IW{1};
b = net1.b{1};
y2 = b+IW*x;
%But y2 = 5 whereas y = 3*x+1 = 16!!!
I understand that mapminmax function is involved for normalization..
Do you know how to renormilize "y2" in order to obtain the "y" target ?
Any help will be really appriciated
Answers (2)
Greg Heath
on 7 Mar 2017
0 votes
What are b, IW and LW?
Given those values and the fact that x and t are both scaled to [-1 1 ] before training and y is rescaled with the t inverse transformation after training , should lead you to the answer.
Thank you for formally accepting my answer
Greg
Gino Massafra
on 7 Mar 2017
Edited: Gino Massafra
on 7 Mar 2017
3 Comments
Steven Lord
on 7 Mar 2017
Gino Massafra
on 7 Mar 2017
Gino Massafra
on 7 Mar 2017
Edited: Gino Massafra
on 7 Mar 2017
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!