diff --git a/.idea/workspace.xml b/.idea/workspace.xml index b724b92..1025693 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -225,7 +225,7 @@ - + diff --git a/train.py b/train.py index a05c6e4..7696112 100644 --- a/train.py +++ b/train.py @@ -100,12 +100,10 @@ def experiment(repeats, series, seed): for r in range(repeats): # fit the model batch_size = 4 - t = train.shape[0] % batch_size - train = train[train.shape[0] - t * batch_size:] - t = test.shape[0] % batch_size - test = test[test.shape[0] - t * batch_size:] + t1 = train.shape[0] % batch_size + t2 = test.shape[0] % batch_size - train_trimmed = train_scaled[2:, :] + train_trimmed = train_scaled[train_scaled.shape[0] - t1 * batch_size:, :] lstm_model = fit_lstm(train_trimmed, batch_size, 30, 4) # forecast the entire training dataset to build up state for forecasting if seed: