AdaBoost thích ứng: mô hình đoạt giải

Ensemble Methods in Python

Román de las Heras

Data Scientist, Appodeal

Mô hình đoạt giải

Về AdaBoost:

  • Đề xuất bởi Yoav Freund và Robert Schapire (1997)
  • Nhận Giải Gödel (2003)
  • Thuật toán boosting thực tiễn đầu tiên
  • Phương pháp ensemble phổ biến, nổi tiếng

giải-godel.jpg

Ensemble Methods in Python

Thuộc tính của AdaBoost

  1. Lấy mẫu theo một phân phối trọng số
    • Mẫu khó có trọng số cao hơn
    • Ban đầu đồng đều
  2. Kết hợp bộ học bằng bỏ phiếu đa số có trọng số
    • Bộ học tốt có trọng số lớn hơn
  3. Bảo đảm cải thiện
  4. Dùng cho Phân loại và Hồi quy

mẫu-adaboost.bmp

Ensemble Methods in Python

Phân loại AdaBoost với scikit-learn

AdaBoostClassifier

from sklearn.ensemble import AdaBoostClassifier
clf_ada = AdaBoostClassifier(
   base_estimator,
   n_estimators,
   learning_rate
)

Tham số

  • base_estimator
    • Mặc định: Cây quyết định (max_depth=1)
  • n_estimators
    • Mặc định: 50
  • learning_rate
    • Mặc định: 1.0
    • Đánh đổi giữa n_estimatorslearning_rate
Ensemble Methods in Python

Hồi quy AdaBoost với scikit-learn

AdaBoostRegressor

from sklearn.ensemble import AdaBoostRegressor
reg_ada = AdaBoostRegressor(
   base_estimator,
   n_estimators,
   learning_rate,
   loss
)

Tham số

  • base_estimator
    • Mặc định: Cây quyết định (max_depth=3)
  • loss
    • linear (mặc định)
    • square
    • exponential
Ensemble Methods in Python

Passons à la pratique !

Ensemble Methods in Python

Preparing Video For Download...