Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Obtaining an analytical function of regression and Understanding the reversing concept of the normalisation (of input data) automatically done by Matlab Neural Network.

1 vue (au cours des 30 derniers jours)
I have a problem in understanding the reversing of the normalisation (of input data) automatically done by Matlab. I have followed the questions/answers presented in matworks.com website (using repmap, mapping and reverse mapping functions) but they does not work. if you can help me, this is my code:
entree=xlsread('........\database.xlsx',1); % inputsize=[24960 8]
sortie=xlsread('........\database.xlsx',2); % outputsize=[24960 1]
n=6 ;
net=fitnet(n);
[net,TR]=train(net,entree',sortie');
%evaluation of the analytical function
x=[ 1100 , 1155 , 10 , 1 , 0 , 0.7 , 343.7508 , 1.00017 ];
b1 = net.b {1}; %size=[4 1]
b2 = net.b {2}; %size=[1 1]
IW = net.IW {1,1}; %size=[4 8]
LW = net.LW {2,1}; %size=[1 4]
a1=IW*x'+b1;
y=purelin(LW*(tansig(a1))+b2); % comparison with net(x')~ 10.37error=abs(net(x')-y);
  1 commentaire
Mohamed El Ibrahimi
Mohamed El Ibrahimi le 25 Juin 2020
Modifié(e) : Mohamed El Ibrahimi le 25 Juin 2020
I have found the response to my question, we can find the right solution by mapping and reverse mapping
entree=xlsread('O:\Stage\database.xlsx',1);
sortie=xlsread('O:\Stage\database.xlsx',2);
entree=entree';
sortie=sortie';
N=length(sortie);
net=fitnet(n);
net.numLayers;
[net,TR]=train(net,entree,sortie,'UseParallel','yes');
%%%%%%%% do and extract Mapping settings %%%%
[entree_map,entree_setMap] = mapminmax (entree);
[sortie_map,sortie_setMap] = mapminmax (sortie);
%%% apply mapping setting + regression Modele test + mapping reverse %%%%%%%%%%%%%%%%
e=[1155 10 0.7 1.00017];
emap= mapminmax ('apply',e',entree_setMap);
b1 = net.b {1};
b2 = net.b {2};
IW = net.IW {1,1};
LW = net.LW {2,1};
B1=repmat(b1,1,N);
B2=repmat(b2,1,N);
a1=IW*emap+b1
h1=tansig(a1);
a2=LW*h1+b2;
h3_map=purelin(a2);
h= mapminmax('reverse',h3_map,sortie_setMap)
y=net(e')
, but it is a nother way to do it, and I think is the best:

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by