始める無料で始める

ドリフトしている特徴量を可視化する

単変量の結果をランキングしたところ、hotelcountry の特徴量のドリフトがモデルのパフォーマンスに最も影響していることがわかりました。この演習では、それらのドリフト結果と分布プロットを確認し、問題の根本原因を見極めます。

単変量ドリフト計算機の結果は、uv_results 変数に保存されています。

この演習はコースの一部です

Pythonで学ぶ機械学習のモニタリング

コースを見る

演習の手順

  • drift_results の period 引数を analysis に設定します。
  • drift_resultscolumn_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()
コードを編集して実行