王书鹏1
迮恒鹏2
王
涛2
黄素珍3
刘桂兰3
(1.盐城工学院经管学院;2.盐城工学院电气学院;3.盐城工学院数理学院)
摘要:利用机器学习技术,基于历史销量数据和钢材产量、橡胶轮胎产量、货币供应量、百度搜索指数、居民消费价格指数等,建立多因素非线性自回归汽车销量预测模型。
关键词:机器学习;非线性自回归;时间序列;销量预测模型
针对汽车销量预测研究问题,目前大多数建立的是传统的时间序列分析模型[1-7]。它们存在两点不足:(1)仅利用汽车历史销售数据解决汽车销量预测问题,事实上存在众多销量影响汽车销量预测的因素,比如原材料因素、消费者因素、网络传播因素、宏观经济因素等;(2)需要事先假定历史销量和销量之间呈线性关系,事实上销量和历史销量以及其他影响因素之间存在高度非线性的关系。本文将利用机器学习技术[8],建立多因素非线性自回归汽车销量预测模型。
表1
一、销量预测模型的构建
选取本月汽车销量作为因变量,解释变量包括历史汽车销量、钢材产量、橡胶轮胎产量、货币供应量、百度搜索指数、居民消费价格指数等,为了方便表述,文中采用表1中的符号建立销量预测模型。
表1中
。设
为本月因素矩阵,
为前k月因素矩阵。
符号说明
符号y(t)x1(t)说明本月汽车销量本月钢材产量本月橡胶轮胎产量本月货币供应量本月百度搜索指数本月居民消费价格指数CPI符号y(t-k)x1(t-k)说明前k月汽车销量前k月钢材产量前k月橡胶轮胎产量前k月货币供应量前k月百度搜索指数前k月居民消费价格指数CPIx2(t)x3(t)x2(t-k)x3(t-k)x4(t)x5(t)x4(t-k)x5(t-k)作者简介:王书鹏(1996-),男,本科,盐城工学院,研究方向:财务分析与决策。
026
(一)无因素非线性自回归模型
如果仅仅考虑历史销量数据对销量的影响,则得到无因素非线性自回归模型为
(二)多因素非线性自回归模型
假设销量不仅与历史销量有关,还与钢材产量、橡胶轮胎产量、货币供应量、百度搜索指数、居民消费价格指数等有关,则得到多因素非线性自回归模型为
二、仿真分析
利用机器学习技术,以大众品牌汽车为例建立销量预测的多因素非线性自回归模型。
(一)数据的获取与处理
采用2011年1月至2018年12月共96个月的数据。
大众品牌汽车月销量数据,来源于车主之家网站https://www.16888.com。
钢材产量、橡胶轮胎产量、货币供应量、居民消费价格指数的月度数据,来源于国家统计局网站http://www.stats.gov.cn/。
百度搜索指数月度数据,来源于百度指数网站http://index.baidu.com。
为了消除数据量纲的影响,将上述数据作归一化处理:
其中
(二)模型参数的设定
科技与产业
非线性自回归的神经网络主要有输入层、隐含层和输出层、输入输出延时层构成。选取隐含层为25,延迟数d为12,其基本结构如图1。
图1
非线性自回归神经网络的基本结构
(三)训练数据、训练数据、验证数据和测试数据的划分将96个样本数据划分如下:训练数据占70%,
验证数据占15%,测试数据占15%。
(四)网络训练
选择训练算法Levenberg-Marquardt,该算法要求样本容量足够大,但是记忆速度快,当验证数据均方误差不再增长,训练自动停止。
(五)预测结果分析
本文建立的大众品牌销量预测模型的结果如表2。
表2
大众品牌销量预测模型的结果
数据个数
MSER训练数据684.27629e-179.99999e-1验证数据143.07607e-25.10501e-1测试数据
14
6.93728e-2
2.18183e-1
表2中MSE为预测销量和实际销量之间的均方误差,MSE越小预测效果越好,当MSE=0时,预测销量=实际销量。R为预测销量和实际销量的相关系数,当R=1时,则预测销量和实际销量完全相关,当R=0时,则预测销量和实际销量完全不相
关。该模型测试数据MSE=0.0694,小于0.1,但R=0.2182,小于0.5,预测效果一般。这是因为样本数据量偏少,只有增加样本容量,才能提高机器学习
预测的精度。
(下转第031页)
027
科技与产业
参考文献:
[1]高原.食品抽样在食品监督工作中的重要地位[J].现代食品,2018(18).
[2]陈章捷.食品安全监督抽样环节存在的风险和对策建议[J].食品安全质量检测学报,2018,9(23).[3]王任,徐涛,倪维芳等.食品安全抽样环节中的问题和建议[J].中国药事,2017,31(6).
(上接第027页)
参考文献:
[1]王旭天.基于BP神经网络的我国汽车销量预测分析[D].东华大学,2016.
[2]郭伟伊.基于R语言时间序列的国内手机品牌搜索指数预测[J].现代商贸工业,2017(29).[3]赵颖.基于回归分析的我国汽车销量预测模型研究[D].华中师范大学,2014.[4]章旭.基于时间序列分析的汽车销量预测研究[D].合肥工业大学,2017.
[5]袁庆玉,彭赓,刘颖,吕本富.基于网络关键词搜索数据的汽车销量预测研究[J].管理家(学术版),2018(01).[6]岑詠霆.销量预测的改进型灰色预测GM(1,1)模型研究[J].工业工程与管理,2013,18(1).[7]苏子杉.汽车市场的销量预测与离散选择模型[D].中国科学技术大学,2009.[8]周志华.机器学习[M].北京:清华大学出版社,2016.
031
ApplicationofMachineLearninginAutomobileSalesForecasting
WangShupeng1,ZeHengpeng2,WangTao2,HuangSuzhen3,LiuGuilan3
(1.SchoolofEconomicsandManagement,YanchengInstituteofTechnology,Yancheng,Jiangsu,224051;
2.SchoolofElectricalEngineering,YanchengInstituteofTechnology,Yancheng,Jiangsu,224051;
3.SchoolofMathematical,YanchengInstituteofTechnology,Yancheng,Jiangsu,224051)
Abstract:Basedonthehistoricalsalesdata,steelproduction,rubbertireproduction,moneysupply,Baidusearchingindex,consumerpriceindex,etc.,amulti-factornonlinearautoregressiveautomobilesalesforecastingmodelwasestablishedbyusingmachinelearningtechnology.
Keywords:machinelearning;nonlinearautoregression;timeseries;salesforecastingmodel
Fortheresearchquestionofautomobilesalesforecasting,mostofthetraditionaltimeseriesanaly-sismodelsareestablishedatpresent[1-7].Therearetwodeficiencies:(1)Solvetheproblemofautosalesforecastingonlybyusinghistoricalautosalesdata.Infact,therearemanyfactorsaffectingsalesvolumeforecasting,suchasrawmaterialfactors,consumerfactors,networkcommunicationfactors,macroeco-nomicfactors,etc.;(2)Assumealinearrelationshipbetweenhistoricalsalesandsalesinadvance.Infact,thereisahighlynon-linearrelationshipbetweensalesandhistoricalsalesvolumeandotherinfluenc-ingfactors.Inthispaper,amulti-factornonlinearautoregressivevehiclesalesforecastingmodelises-tablishedbyusingmachinelearningtechnology[8].
I.SalesForecastModelConstruction
Automobilesalesvolumeofthismonthisse-lectedasthedependentvariable,andexplanatory
variablesincludehistoricalautomobilesalesvol-ume,steelproduction,rubbertireproduction,moneysupply,Baidusearchingindexandconsumerpriceindex,etc.Fortheconvenienceofexpression,thesymbolsinTable1areusedtoestablishthesalesforecastmodel.
InTable1,
.Set
asfactormatrixthismonth,
asfactormatrixinthepreviouskmonths.
(i)No-factorNonlinearAutoregressiveModelIftheinfluenceofhistoricalsalesdataonsalesvolumeisonlyconsidered,thenobtainthenon-fac-tornonlinearautoregressivemodel:
(ii)Multi-factorNonlinearAutoregressiveModel
sdegree,YanchengInstituteofTechnology,researchin-Abouttheauthor:WangShupeng(1996-),male,bachelor’terest:financialanalysisanddecisionmaking.
034
ScienceandIndustry
Table1SymbolDescription
Symboly(t)x1(t)DescriptionCarSalesThisMonthSteelProductionThisMonthRubberTiresProductionThisMonthMoneySupplyThisMonthBaiduSearchingIndexThisMonthConsumerPriceIndexThisMonthCPISymboly(t-k)x1(t-k)DescriptionCarSalesinThePreviouskMonthsSteelProductioninThePreviouskMonthsRubberTiresProductioninThePreviouskMonthsMoneySupplyinThePreviouskMonthsBaiduSearchingIndexinThePreviouskMonthsConsumerPriceIndexinThePreviouskMonthsCPIx2(t)x3(t)x2(t-k)x3(t-k)x4(t)x5(t)x4(t-k)x5(t-k)Assumingthatsalesvolumeisnotonlyrelatedtohistoricalsalesvolume,butalsorelatedtosteelproduction,rubbertireproduction,moneysupply,Baidusearchingindex,consumerpriceindex,etc.,thenthemulti-factornonlinearautoregressivemod-elisobtainedas:
amongit,
II.SimulatedAnalysis
TakingVolkswagenasanexample,amulti-factornonlinearautoregressivemodelforsalesfore-castingisestablishedbyusingmachinelearningtechnology.
(i)DataAcquisitionandProcessing
Adoptedthedatafor96monthsfromJanuary2011toDecember2018.
MonthlysalesdataofVolkswagenarefromwebsitehttps://www.16888.com.
(ii)ModelParametersSettings
Thenonlinearautoregressiveneuralnetworkiscomposedofinputlayer,hiddenlayer,outputlayerandinput/outputdelaylayer.Selectthehiddenlayeras25,delaynumberdas12,itsbasicstructureisshowninFigure1.
Monthlydataofsteelproduction,rubbertireproduction,moneysupplyandconsumerpriceindexarefromthewebsiteofthenationalbureauofstatis-ticshttp://www.stats.gov.cn/.
MonthlydataofBaidusearchingindexarefromBaiduindexwebsitehttp://index.baidu.com.
Inordertoeliminatetheinfluenceofdatadi-mension,theabovedataarenormalized:
Figure1BasicStructureofNonlinearAutoregressiveNeuralNetwork
(iii)DivisionofTrainingData,ValidationDataandTestData
The96sampledataweredividedasfollows:trainingdataaccountedfor70%,verificationdata
035
accountedfor15%,andtestdataaccountedfor15%.
(iv)NetworkTraining
ThetrainingalgorithmLevenberg-Marquardtisselected,whichrequiresalargesamplesizebutfastmemoryspeed.Whenthemeansquareerrorofverifieddatastopsgrowing,thetrainingwillstopau-tomatically.
(v)AnalysisofForecastResults
TheresultsoftheVolkswagenbrandsalesfore-castingmodelestablishedinthispaperareshowninTable2.
Table2
ResultsofVolkswagenBrandSalesForecastingModel
Datanumber
TrainingDataAuthentication
DataTestingData
681414
MSER
effectwillbe.WhenMSE=0,predictedsalesvol-ume=actualsalesvolume.Risthecorrelationcoeffi-cientbetweenpredictedsalesvolumeandactualsalesvolume,WhenR=1,thepredictedsalesvol-umeiscompletelycorrelatedwiththeactualsalesvolume;whenR=0,thepredictedsalesvolumeiscompletelyunrelatedtotheactualsalesvolume.Thismodel’stestingdataMSE=0.0694,lessthan0.1,butR=0.2182,lessthan0.5,showinggeneralpredictioneffect.Thisisbecausetheamountofsam-pledataisrelativelysmall.Onlybyincreasingthesamplesizecantheaccuracyofmachinelearningpredictionbeimproved.
4.27629e-179.99999e-13.07607e-26.93728e-2
5.10501e-12.18183e-1
Intable2,MSEisthemeansquareerrorbe-tweenpredictedsalesvolumeandactualsalesvol-ume.ThesmallerMSEis,thebettertheprediction
References:
[1]王旭天.基于BP神经网络的我国汽车销量预测分析[D].东华大学,2016.
[2]郭伟伊.基于R语言时间序列的国内手机品牌搜索指数预测[J].现代商贸工业,2017(29).[3]赵颖.基于回归分析的我国汽车销量预测模型研究[D].华中师范大学,2014.[4]章旭.基于时间序列分析的汽车销量预测研究[D].合肥工业大学,2017.
[5]袁庆玉,彭赓,刘颖,吕本富.基于网络关键词搜索数据的汽车销量预测研究[J].管理家(学术版),2018(01).[6]岑詠霆.销量预测的改进型灰色预测GM(1,1)模型研究[J].工业工程与管理,2013,18(1).[7]苏子杉.汽车市场的销量预测与离散选择模型[D].中国科学技术大学,2009.[8]周志华.机器学习[M].北京:清华大学出版社,2016.
036
因篇幅问题不能全部显示,请点此查看更多更全内容