简体   繁体   English

反向归一化(Keras/Math)

[英]Reverse normalization (Keras/Math)

I'm trying to reverse this formula, but my math skills are not sufficient.我试图扭转这个公式,但我的数学技能还不够。

# (1 / v) = A small scaler because for some features we want 0.5 as max and not 1.0 as max

ds_min, ds_max = min(ds), max(ds)

normalized_ds = ((ds - ds_min) / (ds_max - ds_min)) / (1 / v)

I found this post ( How do you de-normalise? ) that solves part of the equation.我发现这篇文章( How do you de-normalise? )解决了部分等式。

I have reached this far using the above link:我已经使用上面的链接达到了这一点:

denormalized_ds = normalized_ds * (ds_max - ds_min) + ds_min

But i think i'm missing the last part regarding: "(1 / v)"但我认为我错过了关于:“(1 / v)”的最后一部分

My logic tells me that i need to reverse division to multiplication, but i'm unsure where to put it in the equation to get the correct numbers.我的逻辑告诉我,我需要将除法反转为乘法,但我不确定将它放在等式中的哪个位置以获得正确的数字。

Any help appreciated.任何帮助表示赞赏。 Thanks in advance.提前致谢。

I think i managed to solve it myself through trial-and-error.我想我设法通过反复试验自己解决了这个问题。

denormalized_ds = normalized_ds * 1 / v * (ds_max-ds_min) + ds_min

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM