So I have a Scaler:
scaler = MinMaxScaler(feature_range=(0, 1))
that has 9 columns, where column 0 is my Y, and i use my scaler to work all columns.
When I make the predict:
yhat = model.predict(test_X)
I want to use the same scaler so I can transform back my values to normal, but now my output only has 1 column, and my scaler has 9 and this is a problem.
So what I am hopping to find is a way where I can do something like, grab the scaler and tell him "inverse_transform using the [0] column to work my prediction out."
Is there a way to do this?
Or the only way is to do other Scaler for my Y column and use it?
You can combine the new predicted y value with the x value,get a 9 column matrix and scale it back.But it would be just easier to use two different instances of MinmaxScaler for x and y , so that you can just scale the predicted output back by in-versing the scale for y.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With