How to Reversed Normalization in MinMaxScaler

Viewed 30

i have a data that range between 0 - 2,9.

I need it to be normalized with MinMaxScaler with 0 - 1 range.

I need to transform 2.9 into 0 and 0 into 1. My solution is to subtract all numbers with 2.9 and make it absolute. But is there any other way more efficient than that ? I'm using sklearn for normalization

1 Answers

All you have to do is to multiply your data by -1 prior to normalization. With that your max value (2.9) becomes the new min value (-2.9) that gets normalized to 0 and your min (0) becomea the new max that gets normalized to 1.

Related