Aan de slagGa gratis aan de slag

Drawing diagnostic plots

It's time for you to draw these diagnostic plots yourself using the Taiwan real estate dataset and the model of house prices versus number of convenience stores.

taiwan_real_estate is available as a pandas DataFrame and mdl_price_vs_conv is available.

Deze oefening maakt deel uit van de cursus

Introduction to Regression with statsmodels in Python

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Plot the residuals vs. fitted values
sns.____(x=____, y=____, data=taiwan_real_estate, ____)
plt.xlabel("Fitted values")
plt.ylabel("Residuals")

# Show the plot
plt.show()
Code bewerken en uitvoeren