รูปแบบของ Gradient Boosting

Ensemble Methods ใน Python

Román de las Heras

Data Scientist, Appodeal

รูปแบบต่าง ๆ ของ Gradient Boosting

อัลกอริทึม Gradient Boosting

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

การใช้งาน

  • XGBoost
  • LightGBM
  • CatBoost
Ensemble Methods ใน 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)
Ensemble Methods ใน Python

Light Gradient Boosting Machine

คุณสมบัติที่สำคัญ:

  • เปิดตัวโดย 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)
Ensemble Methods ใน Python

Categorical Boosting

คุณสมบัติที่สำคัญ:

  • เปิดซอร์สโดย Yandex (เมษายน 2017)
  • รองรับฟีเจอร์ประเภท categorical ในตัว
  • แม่นยำและทนทาน
  • รวดเร็วและปรับขนาดได้
  • 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)
Ensemble Methods ใน Python

มาฝึกกันเถอะ!

Ensemble Methods ใน Python

Preparing Video For Download...