简体   繁体   中英

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.

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)"

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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