I was using StandardScaler to standardize my time series data before putting it into the RNN. It has always worked. But now I shifted to MinMaxScaler instead. Everything works well except I cant inverse transform the data back again.
I get the following error when trying to inverse transform:
ValueError: Expected 2D array, got 1D array instead: array=[0.03481037]. Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.
It clearly states that your inputs are in 1D. So try changing it to 2D with the help of reshape function
import numpy as np X = np.array(X).reshape(-1,1) y = np.array(y).reshape(-1,1)
1.4m articles
1.4m replys
5 comments
57.0k users