0
0
ML Pythonml~10 mins

ARIMA model basics in ML Python - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to import the ARIMA model from the statsmodels library.

ML Python
from statsmodels.tsa.arima.model import [1]
Drag options to blanks, or click blank then click option'
AARIMA
BLinearRegression
CKMeans
DRandomForest
Attempts:
3 left
💡 Hint
Common Mistakes
Importing unrelated models like LinearRegression or KMeans.
Using incorrect module paths.
2fill in blank
medium

Complete the code to create an ARIMA model with order (1, 1, 1) for the time series data 'data'.

ML Python
model = ARIMA(data, order=[1])
Drag options to blanks, or click blank then click option'
A(1, 0, 1)
B(1, 1, 1)
C(0, 1, 0)
D(2, 1, 2)
Attempts:
3 left
💡 Hint
Common Mistakes
Using order with zero differencing when data is non-stationary.
Confusing the order tuple values.
3fill in blank
hard

Fix the error in the code to fit the ARIMA model and save the result in 'fitted_model'.

ML Python
fitted_model = model.[1]()
Drag options to blanks, or click blank then click option'
Afit
Btrain
Cpredict
Dtransform
Attempts:
3 left
💡 Hint
Common Mistakes
Using predict() before fitting the model.
Using non-existent methods like train().
4fill in blank
hard

Fill both blanks to generate predictions for the next 5 time points using the fitted ARIMA model.

ML Python
forecast = fitted_model.[1](steps=[2])
Drag options to blanks, or click blank then click option'
Aforecast
Bpredict
C5
D10
Attempts:
3 left
💡 Hint
Common Mistakes
Using predict() instead of forecast() for future points.
Setting steps to a wrong number.
5fill in blank
hard

Fill all three blanks to print the summary of the fitted ARIMA model and extract the AIC value.

ML Python
print(fitted_model.[1]())
aic_value = fitted_model.[2]
print('AIC:', [3])
Drag options to blanks, or click blank then click option'
Asummary
Baic
Caic_value
Dparams
Attempts:
3 left
💡 Hint
Common Mistakes
Trying to call aic as a method instead of attribute.
Printing the attribute directly without storing.