After I MinMaxscaled my train(80%), test(20%), I created Seq2Seq Sequences for Multi-Step timeSeries Forecasting. X_train.shape = (2705, 5, 1) y_train.shape = (2705, 5, 1)
Example X_train and y_train: timeseries: 1, 2 , 3, 4, 5, 6, 7, ...
first row X_train: 1, 2, 3, 4, 5 first row y_train: 6, 7, 8, 9, 10
So I have multiple Input(5) and multiple Output(5).
model = Sequential()
model.add(LSTM(200,
activation='relu',
input_shape=(X_train.shape[1], X_train.shape[2]),
return_sequences=True)))
model_seq2seq_1.add(Dense(1))
model_seq2seq_1.compile(
optimizer='rmsprop',
loss='mse',
metrics=['mse']
)
If I want to fit the model with X_train and y_train it works, but my validation doesnt decrease. The sequences are correct.
hist = model.fit(
X_train,
y_train,
shuffle=False,
validation_data=(X_train, y_train),
validation_split=0.1,
batch_size=32,
epochs=50
)
If I use just X_train it works, but its overfitting. (other problem)
hist = model.fit(
X_train,
X_train,
shuffle=False,
validation_data=(X_train, X_train),
validation_split=0.1,
batch_size=32,
epochs=50
)
I am asking because I want to know, how the model.fit works. How the target looks like, if I take X_train as target..? Is the target also multiple??? Furthermore I want to train the Model with len(X_train) > len(y_train). But its not working with this model I dont know why. Or if I want to create a RNN with len(X_train) > len(y_train), do I have to take an Autoencoder? I am a bit struggling, for which cases I can use Seq2Seq and Autoencoder?
At the end I want to forecast a timeseries with y_train, so I can set up the Output individually. Its univariate.