Reputation: 53
I am implementing an LSTM code in python. I did a preprocessing step to my raw training data to scale it between -1 and 1 as following:
min_max_scaler = preprocessing.StandardScaler()
np_scaled = min_max_scaler.fit_transform(data)
data = pd.DataFrame(np_scaled)
After making prediction for the test data, I got results scaled between -1 and 1.
The question is: How can I reverse this transformation step to get results look like the initial data?
Upvotes: 0
Views: 3063
Reputation: 21709
You can do inverse_transform
original = min_max_scaler.inverse_transform(np_scaled)
Upvotes: 2