我想知道归一化之后我怎么还原原来的数据 正如我给出的程序 帮忙看看 还原还原

a=rand(1);
a
c=(1-a)/2;
p=[596 101.3 8355 6150 67.7;
704 138.1 7785 4215 66.8;
630 134.1 7410 4065 58.8;
381 145.4 8490 5670 89.1;
544 150.4 9780 5055 81.6;
432 156.4 9165 5280 89.8;
460 174.2 7050 6900 120.7;
850 166.2 8355 4845 85.2;
569 195.3 7830 4405 85.6;
514 202.7 7080 5100 100.6;]';
p
r=max(p');
s=[r;r;r;r;r;r;r;r;r;r]';
r
n=min(p');
u=[n;n;n;n;n;n;n;n;n;n]';
q=a*((p-u)./(s-u))+c;
q
t=q(5,1:10);
net=newff(q(1:4,1:10),t,[8 6],{'logsig','purelin'},'trainlm');
net.trainParam.Fcn='traingd';%训练方法:梯度法
net.trainparam.goal=1.0e-20;
net.trainParam.epochs = 1000;
net.trainparam.lr=0.0001;
%学习率默认的是0.1
net=train(net,q(1:4,1:10),t);
w = net.iw{1,1};
b = net.b{1};
w
b
Y=sim(net,q(1:4,1:10));
Y
x=[632 221.5 7185 4155 ;
694 199.6 6045 4380 ;
615 192.3 6150 4455 ]';
d=[n(1:4);n(1:4);n(1:4)]';
g=[r(1:4);r(1:4);r(1:4)]';
m=sim(net,a*((x-d)./(g-d))+c);
m
test=((m-c)./a).*(g-d)+d;
test

我只能大概跟你说一下 详细的你可以在matlab里面查function

我给你复制下来了你看一下(不高兴看的话直接拉到最后)

mapminmax
Provide feedback about this page

Process matrices by mapping row minimum and maximum values to [-1 1]
Syntax

[Y,PS] = mapminmax(YMIN,YMAX)[Y,PS] = mapminmax(X,FP)Y = mapminmax('apply',X,PS)X = mapminmax('reverse',Y,PS)dx_dy = mapminmax('dx',X,Y,PS)dx_dy = mapminmax('dx',X,[],PS)name = mapminmax('name');fp = mapminmax('pdefaults');names = mapminmax('pnames');remconst('pcheck',FP);
Description

mapminmaxprocesses matrices by normalizing the minimum and maximum values of each row to [YMIN,YMAX].
mapminmax(X,YMIN,YMAX)takesXand optional parameters

X
NxQmatrix or a1xTSrow cell array ofNxQmatrices

YMIN
Minimum value for each row ofY(default is -1)

YMAX
Maximum value for each row ofY(default is +1)

and returns

Y
EachMxQmatrix (whereM==N) (optional)

PS
Process settings that allow consistent processing of values

mapminmax(X,FP)takes parameters as a struct:FP.ymin,FP.ymax.
mapminmax('apply',X,PS)returnsY, givenXand settingsPS.
mapminmax('reverse',Y,PS)returnsX, givenYand settingsPS.
mapminmax('dx',X,Y,PS)returns theMxNxQderivative ofYwith respect toX.
mapminmax('dx',X,[],PS)returns the derivative, less efficiently.
mapminmax('name')returns the name of this process method.
mapminmax('pdefaults')returns the default process parameter structure.
mapminmax('pdesc')returns the process parameter descriptions.
mapminmax('pcheck',FP)throws an error if any parameter is illegal.
Examples

Here is how to format a matrix so that the minimum and maximum values of each row are mapped to default interval [-1,+1].
x1 = [1 2 4; 1 1 1; 3 2 2; 0 0 0][y1,PS] = mapminmax(x1)
Next, apply the same processing settings to new values.
x2 = [5 2 3; 1 1 1; 6 7 3; 0 0 0]y2 = mapminmax('apply',x2,PS)
Reverse the processing ofy1to getx1again.
x1_again = mapminmax('reverse',y1,PS)
Algorithm

It is assumed thatXhas only finite real values, and that the elements of each row are not all equal.
y = (ymax-ymin)*(x-xmin)/(xmax-xmin) + ymin;
See Also

fixunknowns,mapstd,processpca

---------------------------------------------------------------------------------------(下面开始重要部分)

eg:x1_again = mapminmax('reverse',y1,PS)
reverse就代表逆归一化
温馨提示:答案为网友推荐,仅供参考
第1个回答  2011-08-10
阿达大大大大大