how does sklearn's Adaboost predict_proba work

2019-05-20 21:31发布

I'm using sklearn's 'predict_proba()' to predict the probability of a sample belonging to a category for each estimators in Adaboost classifier.

from sklearn.ensemble import AdaBoostClassifier
clf = AdaBoostClassifier(n_estimators=50)
for estimator in clf.estimators_:
    print estimator.predict_proba(X_test)

Adaboost implements its predict_proba() like this:

https://github.com/scikit-learn/scikit-learn/blob/bb39b49/sklearn/ensemble/weight_boosting.py#L733

DecisionTreeClassifier is sklearn's base estimator for Adaboost classifier. DecisionTreeClassifier implements its predict_proba() like this:

https://github.com/scikit-learn/scikit-learn/blob/bb39b49/sklearn/tree/tree.py#L549

Anyone kindly tell me how predict_proba() of Adaboost internally calculates the probability? Is there any references with the same topic which can help me ? Please inform me. Thanks in advance.

1条回答
不美不萌又怎样
2楼-- · 2019-05-20 21:51

Maybe the "how it works" section of Adaboost is of some use?

查看更多
登录 后发表回答