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

bookChallenge: ARIMA Forecasting and Evaluation

Opgave

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 alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 3. Kapitel 4
single

single

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

Suggested prompts:

Can you explain this in simpler terms?

What are the main takeaways from this?

Can you give me an example?

close

Awesome!

Completion rate improved to 6.67

bookChallenge: ARIMA Forecasting and Evaluation

Stryg for at vise menuen

Opgave

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 desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 3. Kapitel 4
single

single

some-alt