有效而准确的预测商品混凝土价格变动趋势,对各类建筑的施工规划具有重要意义。相比其他预测模型,随机森林模型具有更高的预测精度。然而不同的数据结构都有其独特之处,针对特定数据结构进行模型优化,有助于提高算法在特定数据上的处理性能。我们针对时间序列分类(TSC:Time Series Classification)的特征提出一种改进随机森林算法。首先将随机森林创建训练子集时的随机抽样调整为倾斜抽样,然后将决策树分裂时的随机特征向量抽样调整为分层抽样,最后以加权投票取代平均投票。实证结果表明相比原始随机森林算法,改进模型具有明显优势,对商品混凝土价格变动的预测准确率达98。4%,预测精度、召回率和F1 评分分别为:98。7%,98。2%,98。4%,可以实现了商品混凝土价格变动趋势的精准预测。
Forecast of Concrete Price Movement Based on Time Series and Improved Random Forest Model
Ready-mixed concrete is one of the primary materials used in various types of construction,including railways,highways,bridges,tunnels,and buildings.Effectively and accurately predicting the price fluctuation trends of ready-mixed concrete can optimize construction planning,enhance economic benefits for construction enterprises,and hold significant importance for the planning of various construction projects.There are two feasible approaches for modeling the prediction of concrete prices:multivariable modeling and univariable modeling.Multivariable modeling involves first analyzing the factors that influence concrete price fluctuations and establishing related multivariate panel data.In contrast,univariable modeling uses historical price data to predict future prices.This method has the advantages of simple data collection and ease of opera-tion,making it widely used in the prediction of various commodity prices.Existing research indicates that the random forest model exhibits higher predictive accuracy than other fore-casting models.However,different data structures have their own unique characteristics.Optimizing the model for specific data structures can help enhance the algorithm's performance on particular datasets.This paper constructs an autoregressive sequence using concrete price data,transforming the price trend prediction problem into a time series classification(TSC)problem.We then perform logical optimizations on the three core steps of building a random forest model.These enhancements improve the applicability of the random forest model to time series data,thereby increasing its performance in predicting concrete price fluctuation trends.Specifically,we first adjust the random sampling used for creating training subsets in the random forest to skewed sampling,strengthening the association between classification categories and classifiers within the random forest.Next,we modify the random feature vector sampling during decision tree splitting to stratified sampling,which helps preserve the temporal characteristics of the time series.Finally,we replace average voting with weighted voting,using the prediction accuracy of each decision tree as its weight.These targeted adjustments enhance the performance of the random forest algorithm in handling TSC tasks.The empirical results indicate that,compared to the original random forest algorithm,the improved model demonstrates significant advantages,achieving a prediction accuracy of 98.4%for changes in ready-mixed concrete prices.The precision,recall,and F1 score of the predictions are 98.7%,98.2%,and 98.4%,respectively,enabling precise forecasting of price trends for ready-mixed concrete.To investigate the robustness of the Improved-RF model,we conduct a comparative analysis of price change predictions for rebar using both the native random forest algorithm and Improved-RF.To further validate the performance of the Improved-RF algorithm,we conduct comparative experiments with various deep learning models.The models selected for these experiments include multilayer neural networks(MLNN),convolutional neural networks(CNN),and long short-term memory networks(LSTM),all of which have demonstrated strong performance in various classification tasks.All models utilize the ReLU activation function and the SoftMax classifier.This study provides valuable insights for various time-series classification tasks and autoregressive-based construction material price predictions.
price trend predictiontime series classificationoptimizationconcrete