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.
Solución
¡Gracias por tus comentarios!
single
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
Awesome!
Completion rate improved to 6.67
Challenge: ARIMA Forecasting and Evaluation
Desliza para mostrar el menú
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.
Solución
¡Gracias por tus comentarios!
single