Aan de slagGa gratis aan de slag

Plot diagnostics

It is important to know when you need to go back to the drawing board in model design. In this exercise you will use 4 common plots to decide whether a model is a good fit to some data.

Here is a reminder of what you would like to see in each of the plots for a model that fits well:

Test Good fit
Standardized residual There are no obvious patterns in the residuals
Histogram plus kde estimate The KDE curve should be very similar to the normal distribution
Normal Q-Q Most of the data points should lie on the straight line
Correlogram 95% of correlations for lag greater than zero should not be significant

An unknown time series df and the ARIMA model class are available for you in your environment.-

Deze oefening maakt deel uit van de cursus

ARIMA Models in Python

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Create and fit model
model = ARIMA(df, order=(____))
results = model.fit()

# Create the 4 diagnostics plots
____
plt.show()
Code bewerken en uitvoeren