|
|
1
6
看起来您的模型拟合过度,总是返回上一个时间步的值作为预测。您的数据集可能太小,无法拥有具有如此多参数的模型。你需要求助于对抗过度拟合的技术:积极的退出,添加更多的数据,或者尝试更简单、更少过度参数化的方法。 这些答案可能包含一些有用的信息: LSTM Sequence Prediction in Keras just outputs last step in the input LSTM model just repeats the past in forecasting time series LSTM NN produces âshiftedâ forecast (low quality result) Keras network producing inverse predictions Stock price predictions of keras multilayer LSTM model converge to a constant value Keras LSTM predicted timeseries squashed and shifted LSTM Time series shifted predictions on stock market close price Interesting results from LSTM RNN : lagged results for train and validation data 最后,请注意,根据数据集的性质,可能根本没有在数据中发现任何模式。在人们试图用LSTM预测股市时,你会看到很多这种情况(关于如何预测彩票号码,存在一个关于stackoverflow的问题)。 |
|
|
2
-1
答案比我们想象的要简单得多。。。 我看到很多人说这是由于过度拟合和数据量过大造成的。其他一些人表示,这是由于重新缩放。 经过几次尝试,我找到了解决方案: 在将数据馈送到RNN之前,尝试执行去趋势化。 例如,您可以对数据进行简单的二次多项式拟合,从而得到多项式公式。并且可以减少与公式值相对应的每个数据值。然后我们得到一个新的数据集,我们可以将它反馈给LSTM,在预测之后,我们可以将趋势添加到结果中,结果应该会更好。 |