Challenge: ARIMA Forecasting and Evaluation
Swipe to start coding
You will build, forecast, and evaluate an ARIMA model using the built-in AirPassengers dataset.
Perform the following steps:
-
Load the dataset
flightsfrom seaborn and extract the"passengers"series as a time series indexed by month. -
Split the data into:
- Training set → all data except the last 12 months
- Testing set → last 12 months
-
Fit an ARIMA(2,1,2) model on the training set using
statsmodels.tsa.arima.model.ARIMA. -
Forecast the next 12 months.
-
Compute and print the following metrics between the forecast and the actual test values:
- Mean Absolute Error (MAE)
- Root Mean Squared Error (RMSE)
-
Plot:
- The original series
- The forecasted values over the test range.
Solução
Obrigado pelo seu feedback!
single
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Awesome!
Completion rate improved to 6.67
Challenge: ARIMA Forecasting and Evaluation
Deslize para mostrar o menu
Swipe to start coding
You will build, forecast, and evaluate an ARIMA model using the built-in AirPassengers dataset.
Perform the following steps:
-
Load the dataset
flightsfrom seaborn and extract the"passengers"series as a time series indexed by month. -
Split the data into:
- Training set → all data except the last 12 months
- Testing set → last 12 months
-
Fit an ARIMA(2,1,2) model on the training set using
statsmodels.tsa.arima.model.ARIMA. -
Forecast the next 12 months.
-
Compute and print the following metrics between the forecast and the actual test values:
- Mean Absolute Error (MAE)
- Root Mean Squared Error (RMSE)
-
Plot:
- The original series
- The forecasted values over the test range.
Solução
Obrigado pelo seu feedback!
single