How can I denormalize the equation in Matlab automatically ?

조회 수: 8 (최근 30일)
ND
ND 2016년 1월 12일
댓글: Greg Heath 2016년 1월 17일
Actually, I have normalized my data before run the software that I have automatically (works in excel sheet and the data used is attached).The data scaled from [0 to 1] and getting an equation. My question is how can I re-normalize the equation to be written with actual data automatically? As I am doing that manually like this.
X = (Xi - Xmin)/(Xmax - Xmin).
Y = (Yi- Ymin)/(Ymax -Ymin)
Many thanks
  댓글 수: 2
jgg
jgg 2016년 1월 12일
I'm not clear what you're asking here. If you've loaded the data, what variables are you working with? If you haven't loaded it, I don't see how you can recover non-normalized values from normalized data.
ND
ND 2016년 1월 12일
편집: ND 2016년 1월 13일
I normalized the data and put it in a software works like neural network gives me equation but I need to use this equation further , so I should re scale it again to be in actual data.

댓글을 달려면 로그인하십시오.

답변 (2개)

Walter Roberson
Walter Roberson 2016년 1월 13일
denormalized_X = normalized_X * (Xmax - Xmin) + Xmin;
  댓글 수: 3
Walter Roberson
Walter Roberson 2016년 1월 14일
If that Y is the result of operating on the normalized data, then:
More generally, Y = C3*nx^3+C2*nx^2+C1*nx+C0 where nx is your normalized x. Then since your normalized x is nx = (x-xmin)/(xmax-xmin) you can substitute that into the Y equation, and clean up the answer a bit, to get
Y = (C3 * x^3 + (xmax * C2 - (C2 + 3*C3) * xmin) * x^2 + (xmax^2 * C1 - 2*(C1+C2) * xmin * xmax + (C1 + 2*C2 + 3*C3) * xmin^2) * x + C0 * xmax^3 -(3*C0+C1) * xmin * xmax^2 + (3*C0+2*C1+C2) * xmin^2 * xmax -(C0+C1+C2+C3) * xmin^3 ) / (xmax - xmin)^3
and now your Y is expressed in terms of the unnormalized x.
Here, xmin and xmax should be the minimum and maximum value normalized against, which might possibly be fixed values (depending on the setup), or might be min(x) and max(x) (in other setups.)
Greg Heath
Greg Heath 2016년 1월 17일
Since both X and Y are normalized, Walters equation gives you Yn. Then use his other equation
Y = Ymin + (Ymax-Ymin)*Yn
Hope this helps.
Greg

댓글을 달려면 로그인하십시오.


Greg Heath
Greg Heath 2016년 1월 13일
No.
If you are using MATLAB NN training functions, you don't have to do anything because the defaults are
1. Automatic normalization of inputs and targets to [-1,1]
2. Automatic denormalization of outputs from [-1,1] to the original target scale.
However, before training I do use ZSCORE (standardize to zero-mean/unit-variance) to check for, modify and/or delete outliers.
However, inputs and targets are trained using the original scaling.
Hope this helps.
Thank you for formally accepting my answer
  댓글 수: 1
ND
ND 2016년 1월 13일
Hi Heath, It is not NN in Matlab, but it works like neural network.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by