Fitting Prelude
Great, you understand model order! Understanding the order is important when it comes to fitting models. You will always need to select the order of model you fit to your data, no matter what that data is.
In this exercise you will do some basic fitting. Fitting models is the next key step towards making predictions. We'll go into this more in the next chapter but let's get a head start.
Some example ARMA(1,1) data have been created and are available in your environment as y
. This data could represent the amount of traffic congestion. You could use forecasts of this to suggest the efficient routes for drivers.
Este ejercicio forma parte del curso
ARIMA Models in Python
Instrucciones del ejercicio
- Import the
ARIMA
model class from thestatsmodels.tsa.arima.model
submodule. - Create a model object, passing it the time series
y
and the model order(1,0,1)
. Assign this to the variablemodel
. - Use the model's
.fit()
method to fit to the data.
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
# Import the ARIMA model
from ____ import ____
# Instantiate the model
model = ____(____, order=____)
# Fit the model
results = ____