開始使用免費開始

繪製診斷圖

現在輪到你使用臺灣房地產資料集,針對「房價對便利商店數量」的模型,親自繪製這些診斷圖。

taiwan_real_estatepandas 的 DataFrame 提供,mdl_price_vs_conv 也已可用。

本練習屬於課程

使用 Python 中的 statsmodels 進行回歸入門

檢視課程

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# 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()
編輯並執行程式碼