Search code examples
python-3.xlstmrecurrent-neural-network

High accuracy on LSTM-RNN model implemented on time-series forecasting


I am new in LSTM-RNN. I have tested many RNN-LSTM python code with .csv files for time-series. None of them had the accuracy that this guy here: https://machinelearningmastery.com/time-series-prediction-lstm-recurrent-neural-networks-python-keras/ has. How can he achieves that with just 4 LSTM cells?

model.add(LSTM(4, input_shape=(1, look_back)))

Am I missing something here? Is there something wrong in the code? I am referring to his first example code: "LSTM Network for Regression"


Solution

  • I remember this article from years ago (it's from 2016). Don't expect too much from this. It's just a tutorial with toy data.

    The author later half-acknowledged that data was too small, had bias and the model was greatly overfitted, which is easily spottable from the graph where predictions and ground truth are just lagging from each other. It's always a bad sign.

    You can get that from the comments if you search for "bias, "lookahead" or "overfit".