tensorflow - LSTM 平稳时间序列预测不稳定模型
问题描述
我是 Tensorflow 2 的初学者,我正在尝试进行多时间序列预测,以使用 10 个时间步长的向量(接下来的 10 天,最后一个密集层 = 10)来预测铜(LME)的价格。我的预测结果不是很好,所以我读到通过使数据静止,模型效率更好。我修改了我的程序如下:
-Time serie stationary
-2 Bidirectional layers(LSTM) of 20 neurons with 10 neurons in the output layer
-SELU activation
-initialization lecun_normal
-lr : 0.0005
-batch normalization
-lookback : 45 + Batch_size :8 + mse + seed constant 4000
-Validation split: 0.05 + Dropout :0.01
序列平稳性较好,但模型不稳定。我认为我在选择超参数时犯了初学者的错误。的确:
- There is no correlation between the minimum loss and the prediction quality
- The result is totally variable with the modification of the seed value
- With a training with a larger number of epochs, the prediction curves flatten
- The smallest val_loss does not generate the best prediction
- Val_Acc does not exceed 0.14
- During training the loss slowly decreases but the val_acc does not increase.
- Often the best results are for less than 5 epochs of learning
- Loss and val_loss decrease but val_accurate does not increase
- The model prediction is very sensitive to the parameters. You can compare the two predictions of `enter code here`the same model in dotted red over 10 days with Dropout=0.01 and Dropout 0.02: they are opposite.
Do you have an idea to improve my model?
Thanks
DROPOUT : 0.01 上升预测 在此处输入图像描述 DROPOUT : 0.02 自上而下预测 在此处输入图像描述
解决方案
推荐阅读
- python - 当字符串和子字符串的长度相等时,Python 中的字符串 find() 是否不起作用?
- python - TypeError:无法将 str 连接到字节
- excel - 如何创建包含条件格式的用户表单表?
- laravel - 如何用你的包语言覆盖 Laravel 的语言文件
- api - 适用于移动设备和 Web 的安全 API
- unit-testing - 在 go 中测试连接的正确方法
- batch-file - 检查内容和文件名的批处理脚本
- python - 逐行读取csv文件并保存满足特定条件的行
- ffmpeg - VLC播放器如何计算fmp4文件时间线的总长度?
- react-native - 看起来应用程序无权访问本机反应中的位置