Time-series-forecasting

The dataset used is AirPassengers.csv the public dataset which contains the number of passengers who traveled by airline per month from 1949 to 1960. The dataset has 144 observations and two columns: Month and the number of passengers..

📚 Analysis and transforms

  • Time series decomposition (STL & Classical Decomposition)

    • Level
    • Trend
    • Seasonality
    • Noise
  • Stationarity

    • AC and PAC plots
    • Rolling mean and std
    • Dickey-Fuller test
  • Making our time series stationary

    • Difference transform
    • The Box-Cox transformation
    • Smoothing
    • Moving average

🔍 Forecasting results

I used Rolling Forward for evalution next day

Evaluation Metrics

  • Mean Absolute Error (MAE)
  • Mean Absolute Percentage Error (MAPE)
  • Root Mean Squared Error (RMSE)
Model mae rmse mape
Moving Average (MA) 36.1 48.36 12.25
Weighted Moving Average (WMA) 30.61 40.90 10.45
Linear Model 34.4 45.7 12.3
Linear Model With STL 34.4 45.7 12.3
Naïve 25.8 33.7 9.01
MLR 5.259989974446297e-14 6.422239031165233e-14 1.8281416595513634e-14
ARIMA 26.0 32.98 32.5
SARIMA 17.8 22.63 5.79
AR (Autoregressive) 24.8 31.036 8.94
Advanced Smoothing Single Exp 28.43 36.26 8.9
Advanced Smoothing Double exp 31.5 39.9 3.34/td>
Advanced Smoothing Triple exp 9.5 12.7 9.7
Prophet 6.8 6.87 3.14
XGBOOST 30.5 41.3 6.97
LGBMRegressor 27.0 38.0 6.22
KNeighborsRegressor 22.15 25.48 4.72
SVR 44.57 56.77 9.259