Hello Lohith,

To convert the scaled predicted values to normal values, we use inverse_transform.

Code can be modified as below to get the normal values.

First scaling individual features with different scalers as MinMax scalers should not be fitted twice

from sklearn.preprocessing import MinMaxScaler
sc1= MinMaxScaler(feature_range=(0,1))
sc2= MinMaxScaler(feature_range=(0,1))
stock_volume = input_feature[:,0]
stock_average= input_feature[:,1]
input_data_1 = sc1.fit_transform(stock_volume.reshape(-1,1))
input_data_2 = sc2.fit_transform(stock_average.reshape(-1,1))
input_data=np.hstack((input_data_1, input_data_2))

To get the normal values for the predicted data we use sc2 scaler for inverse transformation to get the stock averages.

One point to note is that when we scale back, scikit learn works under the assumption that all subsequent data passed to it will have the same number of features. This is the reason why we used two scalers

predicted_stock_price= sc2.inverse_transform(predicted_value)

Hope this answers your question

Loves learning, sharing, and discovering myself. Passionate about Machine Learning and Deep Learning

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store