From 0e5fe227f7e0243855a9ac0ed495728c0318d5c1 Mon Sep 17 00:00:00 2001 From: Mark Aron Szulyovszky Date: Wed, 10 Nov 2021 19:35:46 +0100 Subject: [PATCH] fix(Model): drop index before feeding into keras.dataset --- model_lstm.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/model_lstm.py b/model_lstm.py index 27dfb62..82929d8 100644 --- a/model_lstm.py +++ b/model_lstm.py @@ -5,6 +5,7 @@ import keras from utils.normalize import normalize data = load_files('data/', False) +data.reset_index(drop=True, inplace=True) ticker_to_predict = 'ETH_returns' @@ -26,6 +27,7 @@ end = start + train_split x_train = data.loc[0 : train_split - 1].drop(ticker_to_predict, axis=1).values y_train = data.iloc[start:end][ticker_to_predict] +#%% dataset_train = keras.preprocessing.timeseries_dataset_from_array( x_train,