Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Challenge: ARIMA Forecasting and Evaluation | Implementing ARIMA for Forecasting
Time Series Forecasting with ARIMA

bookChallenge: ARIMA Forecasting and Evaluation

Tâche

Swipe to start coding

You will build, forecast, and evaluate an ARIMA model using the built-in AirPassengers dataset.

Perform the following steps:

  1. Load the dataset flights from seaborn and extract the "passengers" series as a time series indexed by month.

  2. Split the data into:

    • Training set → all data except the last 12 months
    • Testing set → last 12 months
  3. Fit an ARIMA(2,1,2) model on the training set using statsmodels.tsa.arima.model.ARIMA.

  4. Forecast the next 12 months.

  5. Compute and print the following metrics between the forecast and the actual test values:

    • Mean Absolute Error (MAE)
    • Root Mean Squared Error (RMSE)
  6. Plot:

    • The original series
    • The forecasted values over the test range.

Solution

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 3. Chapitre 4
single

single

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

close

Awesome!

Completion rate improved to 6.67

bookChallenge: ARIMA Forecasting and Evaluation

Glissez pour afficher le menu

Tâche

Swipe to start coding

You will build, forecast, and evaluate an ARIMA model using the built-in AirPassengers dataset.

Perform the following steps:

  1. Load the dataset flights from seaborn and extract the "passengers" series as a time series indexed by month.

  2. Split the data into:

    • Training set → all data except the last 12 months
    • Testing set → last 12 months
  3. Fit an ARIMA(2,1,2) model on the training set using statsmodels.tsa.arima.model.ARIMA.

  4. Forecast the next 12 months.

  5. Compute and print the following metrics between the forecast and the actual test values:

    • Mean Absolute Error (MAE)
    • Root Mean Squared Error (RMSE)
  6. Plot:

    • The original series
    • The forecasted values over the test range.

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 3. Chapitre 4
single

single

some-alt