I am trying regression on a time series data, but am not getting acceptable predictions below a certain value. It's a time series trading data with the last 20% used for testing and predictions.
I am using the following parameters:
opt = keras.optimizers.Adam(lr=0.01)
def BuildModel():
model = Sequential()
model.add(Dense(256, input_dim=13,activation='relu'))
model.add(Dense(128, activation='relu'))
model.add(Dense(64,activation='relu'))
model.add(Dense(32,activation='relu'))
model.add(Dense(1,activation='linear'))
model.compile(loss="mean_squared_error", optimizer=opt)
return model
After comparing the test and predicted labels, I am getting this:
Now, I don't know why the predictions are not working below a certain value.
I have tried the regression on both raw values, as well as scaled up values, through MinMaxScaler:
scaler01 = MinMaxScaler(feature_range=(0, 1))
X_scaled = scaler01.fit_transform(df_01)
I have tried on both raw, as well as scaled features (Y).
My guess is that either I am doing something wrong with the scaling, or since there are less features (OHLC) below that value, it's not predicting correctly.
Can someone please point me to the right direction?
