How to denormalize the output

5 ビュー (過去 30 日間)
Sam Kalho
Sam Kalho 2022 年 2 月 23 日
コメント済み: Star Strider 2022 年 2 月 23 日
Hello all,
I need your help to solve my problem.
I used the 'normalize' command to prepare my dataset for Deep Learning.
data_normalized = normalize(data, 'range', [-1 1]) ;
Do you have any idea how I can just denormalize my output at the end?
I don't know how to use "mapminmax" instead of "normalize" for neural networks.
Now I wanted to denormalize my prediction again. I have a problem doing this. Could you please help me on this?
I would be very grateful to you guys.
Thank you in advance.
I looked up in MATLAB documentation that 'range' or 'rescale' is calculated using the following function.
Xrescaled=a+[X-minXmaxX-minX](b-a) .
My code is :
a = (YPred_mat+1)./2
b = (max(YPred_mat)-min(YPred_mat));
YPred_denormalized = (b.*a1)+ min(YPred_mat);
Thanks.

採用された回答

Star Strider
Star Strider 2022 年 2 月 23 日
Assuming that the normalisation was by z-score, if the mean and standard deviation of the original data were calculated and saved, then de-normalising them would be straightforward:
data_denormed = (data_zscore * data_standard_deviation) + data_mean;
If those data were not saved, then all is lost.
.
  2 件のコメント
Sam Kalho
Sam Kalho 2022 年 2 月 23 日
thanks a lot.
Star Strider
Star Strider 2022 年 2 月 23 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFunction Approximation, Clustering, and Control についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by