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.
Diese Übung ist Teil des Kurses
ARIMA Models in Python
Anleitung zur Übung
- Import the
ARIMAmodel class from thestatsmodels.tsa.arima.modelsubmodule. - Create a model object, passing it the time series
yand the model order(1,0,1). Assign this to the variablemodel. - Use the model's
.fit()method to fit to the data.
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
# Import the ARIMA model
from ____ import ____
# Instantiate the model
model = ____(____, order=____)
# Fit the model
results = ____