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.
Рішення
Дякуємо за ваш відгук!
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Awesome!
Completion rate improved to 6.67
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.
Рішення
Дякуємо за ваш відгук!
single