勾配ブースティングの種類

Pythonで学ぶアンサンブル手法

Román de las Heras

Data Scientist, Appodeal

勾配ブースティングのバリエーション

勾配ブースティングアルゴリズム

  • Extreme Gradient Boosting
  • Light Gradient Boosting Machine
  • Categorical Boosting

実装

  • XGBoost
  • LightGBM
  • CatBoost
Pythonで学ぶアンサンブル手法

Extreme Gradient Boosting(XGBoost)

主な特長:

  • 分散処理に最適化
  • 本質的に並列学習
  • スケーラブル、移植性あり、高精度
import xgboost as xgb

clf_xgb = xgb.XGBClassifier(
   n_estimators=100,
   learning_rate=None,
   max_depth=None,
   random_state
)
clg_xgb.fit(X_train, y_train)
pred = clf_xgb.predict(X_test)
Pythonで学ぶアンサンブル手法

Light Gradient Boosting Machine(LightGBM)

主な特長:

  • Microsoftが公開(2017年)
  • 学習が速く高効率
  • 軽量(メモリ使用量が少ない)
  • 並列・GPU処理に最適化
  • 大規模データや速度/メモリ制約下で有用
import lightgbm as lgb

clf_lgb = lgb.LGBMClassifier(
   n_estimators=100,
   learning_rate=0.1,
   max_depth=-1,
   random_state
)
clf_lgb.fit(X_train, y_train)
pred = clf_lgb.predict(X_test)
Pythonで学ぶアンサンブル手法

Categorical Boosting(CatBoost)

主な特長:

  • Yandexがオープンソース化(2017年4月)
  • カテゴリ特徴量を標準で処理
  • 高精度でロバスト
  • 高速かつスケーラブル
  • 使いやすいAPI
import catboost as cb

clf_cat = cb.CatBoostClassifier(
   n_estimators=None,
   learning_rate=None,
   max_depth=None,
   random_state
)
clf_cat.fit(X_train, y_train)
pred = clf_cat.predict(X_test)
Pythonで学ぶアンサンブル手法

あなたの番です!

Pythonで学ぶアンサンブル手法

Preparing Video For Download...