ドリフトしている特徴量を可視化する
単変量の結果をランキングしたところ、hotel と country の特徴量のドリフトがモデルのパフォーマンスに最も影響していることがわかりました。この演習では、それらのドリフト結果と分布プロットを確認し、問題の根本原因を見極めます。
単変量ドリフト計算機の結果は、uv_results 変数に保存されています。
この演習はコースの一部です
Pythonで学ぶ機械学習のモニタリング
演習の手順
drift_resultsの period 引数をanalysisに設定します。drift_resultsのcolumn_namesに hotel と country を渡します。.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()