視覺化有漂移的特徵
在針對單變數結果排序後,你知道出現漂移的 hotel 與 country 特徵對模型效能影響最大。這個練習中,你會檢視它們的漂移結果與分佈圖,以判斷問題的根本原因。
單變數漂移計算器的結果已儲存在變數 uv_results 中。
本練習屬於課程
在 Python 中監控 Machine Learning
練習說明
- 將
drift_results的 period 參數設為analysis。 - 將 hotel 與 country 傳入
drift_results的column_names。 - 在
.plot()方法中將kind參數設為"drift"。 - 對
distribution_results做相同設定,但在.plot()方法中將kind參數設為"distribution"。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Filter and create drift plots
drift_results = uv_results.filter(
period=____,
column_names=[____, ____]
).plot(kind=____)
# Filter and create distribution plots
distribution_results = uv_results.filter(
period=____,
column_names=[____, ____]
).plot(kind=____)
# Show the plots
drift_results.show()
distribution_results.show()