与神经网络相比,ARIMA 是否更好?

机器算法验证 神经网络 有马 反向传播
2022-04-12 12:24:21

在研究了反向传播神经网络和 ARIMA 时间序列模型之后,我问自己哪个更好,但无法弄清楚答案。他们都对同一个问题(未来预测)使用不同的方法。请有人可以帮我说明显而易见的事情。

反向传播(C++):

 typedef struct {                     /* A LAYER OF A NET:                     */
    INT           Units;         /* - number of units in this layer       */
    REAL*         Output;        /* - output of ith unit                  */
    REAL*         Error;         /* - error term of ith unit              */
    REAL**        Weight;        /* - connection weights to ith unit      */
    REAL**        WeightSave;    /* - saved weights for stopped training  */
    REAL**        dWeight;       /* - last weight deltas for momentum     */
} LAYER;

typedef struct {                     /* A NET:                                */
    LAYER**       Layer;         /* - layers of this net                  */
    LAYER*        InputLayer;    /* - input layer                         */
    LAYER*        OutputLayer;   /* - output layer                        */
    REAL          Alpha;         /* - momentum factor                     */
    REAL          Eta;           /* - learning rate                       */
    REAL          Gain;          /* - gain of sigmoid function            */
    REAL          Error;         /* - total net error                     */
} NET;

阿里玛(R):

arima(stockadj,order=c(best.model[1],best.model[2],best.model[3]),xreg=1:n)
stockfor<-predict(stockari,h=100,newxreg=(n+1):(n+100))
ts.plot(stockadj,stockfor$pred,ylab="Original+Predicted Values",main="Forecast")   
2个回答

看起来您正在使用这两种模型进行时间序列预测。我会交叉验证这两个模型并比较它们的样本外错误。

NN 忽略异常值。如果你忽略异常值,那么你就有大麻烦了。

您的 ARIMA 模型也忽略了异常值,所以您也遇到了大麻烦。

至于交叉验证,那就是那些将模型拟合到数据而不是实际建模的人。只有 849 页的教科书“预测原则”同意我的这一说法,但如果你已经处理了所有你需要做的事情,那么你会变得如此愚蠢。请参阅此处的参考资料。

4.6 获取最新数据

在此处查看有关异常值的更多信息。