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

bookChallenge: ARIMA Forecasting and Evaluation

Uppgift

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.

Lösning

Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 3. Kapitel 4
single

single

Fråga AI

expand

Fråga AI

ChatGPT

Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal

close

Awesome!

Completion rate improved to 6.67

bookChallenge: ARIMA Forecasting and Evaluation

Svep för att visa menyn

Uppgift

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.

Lösning

Switch to desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 3. Kapitel 4
single

single

some-alt