From e7437e5a98eb81430508886cb1b6a6af43637d12 Mon Sep 17 00:00:00 2001 From: Newnius Date: Sat, 2 May 2020 11:09:41 +0800 Subject: [PATCH] update --- .idea/workspace.xml | 20 +++++++++++--------- train.py | 10 +++++----- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 6c34b98..ea149ca 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,6 +2,7 @@ + @@ -47,7 +48,7 @@ - + @@ -56,7 +57,7 @@ - + @@ -91,8 +92,8 @@ - - + + @@ -225,7 +226,7 @@ - + @@ -266,15 +267,16 @@ - + @@ -396,8 +398,8 @@ - - + + diff --git a/train.py b/train.py index af570a8..1ab36ce 100644 --- a/train.py +++ b/train.py @@ -104,14 +104,14 @@ def experiment(repeats, series, seed): t2 = test.shape[0] % batch_size train_trimmed = train_scaled[train_scaled.shape[0] - t1 * batch_size:, :] - lstm_model = fit_lstm(train_trimmed, batch_size, 30, 4) + lstm_model = fit_lstm(train_trimmed, batch_size, 300, 4) # forecast the entire training dataset to build up state for forecasting print(train_trimmed) print(train_trimmed[:, 0]) print(train_trimmed[:, :-1]) - if seed: - train_reshaped = train_trimmed[:, :-1].reshape(len(train_trimmed), 1, lag2) - lstm_model.predict(train_reshaped, batch_size=batch_size) + # if seed: + # train_reshaped = train_trimmed[:, :-1].reshape(len(train_trimmed), 1, lag2) + # lstm_model.predict(train_reshaped, batch_size=batch_size) # forecast test dataset test_reshaped = test_scaled[:, 0:-1] test_reshaped = test_reshaped.reshape(len(test_reshaped), 1, lag2) @@ -137,7 +137,7 @@ def experiment(repeats, series, seed): # load dataset series = read_csv('data.csv', header=0, index_col=0, squeeze=True) # experiment -repeats = 30 +repeats = 1 results = DataFrame() # with seeding with_seed = experiment(repeats, series, True)