Quantcast
Viewing all articles
Browse latest Browse all 14011

How to unscale data after predictions?

I have a dataset with 2 features (price & volume) & 1 predicted variable (price) and use LTSM model to predict next price based on the previous set of prices.

First I scale the dataset:

#Scale the datascaler = MinMaxScaler(feature_range=(0,1))scaled_data = scaler.fit_transform(dataset)

Finally I want to unscale it:

#Get the models predicted price valuespredictions = model.predict(x_test)predictions = scaler.inverse_transform(predictions)

But this doesn't work and I get this error:

ValueError: non-broadcastable output operand with shape (400,1) doesn't match the broadcast shape (400,2)

Viewing all articles
Browse latest Browse all 14011

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>