I am trying to get the r-sqaured score of my model (time-series forecasting using GRU). But I cannot reshape my test_y.
split into train and test sets
values = reframed_df.values training_sample =int( len(df) *0.8) train = values[:training_sample, :] test = values[training_sample:, :]
split into input and outputs
train_X, train_y = train[:, :-1], train[:, -1] test_X, test_y = test[:, :-1], test[:, -1]
reshape input to be 3D [samples, time steps, features]
train_X = train_X.reshape((train_X.shape, 1, train_X.shape1)) test_X = test_X.reshape((test_X.shape, 1, test_X.shape1)) print(train_X.shape, train_y.shape, test_X.shape, test_y.shape)
Then after that, I want to validate my results so I tried to reshape my y: