English

中国农机化学报

中国农机化学报 ›› 2021, Vol. 42 ›› Issue (8): 151-160.DOI: 10.13733/j.jcam.issn.2095-5553.2021.08.21

• 中国农机化学报 • 上一篇    下一篇

基于BILSTM的棉花价格预测建模与分析

江知航;王艳霞;颜家均;周堂容;   

  1. 重庆师范大学计算机与信息科学学院;重庆市江津区农业工程建设服务中心;重庆市数字农业服务工程技术研究中心;重庆市江津区农产品质量安全中心;重庆市江津区圣泉街道农业服务中心;
  • 出版日期:2021-08-15 发布日期:2021-08-15
  • 基金资助:
    重庆市教委科技项目(KJQN2001900520)

 Modeling and analysis of cotton price forecast based on BILSTM

Jiang Zhihang, Wang Yanxia, Yan Jiajun, Zhou Tangrong.   

  • Online:2021-08-15 Published:2021-08-15

摘要: 棉花市场价格指数波动是一个非常复杂的非线性系统,具有随机波动特性,容易受到气象、金融、政策和国际环境影响。在现有研究棉花价格的数据集特征的基础上如政策、国际环境、进出口、产量等,增加气候因素对棉花价格影响的数据特征如降水、日照、湿度等,并对数据进行收集、整理及预处理。基于棉花价格的波动特性,采用双向长短期记忆网络BiLSTM(bidirectional long short-term memory, BiLSTM)模型对棉花价格进行预测,使用长短期记忆网络LSTM(Long Short Term Memory Network, LSTM)和LightGbm模型进行对比试验。由于随机梯度下降(SGD)优化器在训练的过程中产生频繁波动,较多情况下得到的是局部最优值。采用SWA(Stochastic Weight Averaging)优化算法取SGD轨迹的多点简单平均值对SGD进行优化,避免SGD在梯度下降过程中的频繁波动问题,使其模型能将Loss和损失值收敛至全局最优,进一步提高训练的稳定性。试验结果表明:BILSTM模型能够很好地对测试集价格曲线进行拟合,误差值最小,价格预测精度较高;采用SWA算法优化的LSTM和BILSTM网络结构收敛至全局最优,平均绝对误差(MAE)分别提高18%和43%。该模型能够更精确地表现棉花市场价格波动规律,帮助棉花市场从业者和投资者优化经营策略。

关键词: 神经网络, 长短期记忆网络, 随机权重平均, 棉花价格预测

Abstract: The fluctuation of the cotton market price index is a very complex nonlinear system with random fluctuation characteristics, which is easily affected by weather, finance, policy, and the international environment. In this paper, based on the existing research on the characteristics of the cotton price data set, such as policy, international environment, import and export, production, the data characteristics of the impact of climate factors on cotton prices such as precipitation, sunshine, humidity were added, and the data were analyzed collection, sorting and pretreatment. Based on the volatility characteristics of cotton prices, a bidirectional long shortterm memory (BiLSTM) model to predict cotton prices coupled with Long Short Term Memory Network (LSTM) and LightGbm trees were used in this research. The model was tested for comparison. Since the Stochastic Gradient Descent (SGD) optimizer produced frequent fluctuations during the training process, in most cases, the local optimal value was obtained. This experiment used the SWA (Stochastic Weight Averaging) optimization algorithm to take the multipoint simple average of the SGD trajectory to optimize SGD. This avoided the frequent fluctuation of SGD in the gradient descent process, and enabled the model to converge Loss and loss values to the global optimal to further improve the stability of training. The experimental results showed that the BILSTM model can fit the price curve of the test set well, with the smallest error value and high price prediction accuracy. The LSTM and BILSTM network structures optimized by the SWA algorithm converged to the approximate global optimum, with the average absolute error (MAE) increased by 18% and 43% respectively. This model can represent the law of cotton market price fluctuations more accurately and help cotton market practitioners and investors optimize their business strategies.

Key words: neural network, longshortterm memory network, stochastic weight averaging, cotton price forecast

中图分类号: