how does sklearn's Adaboost predict_proba works internally?

给你一囗甜甜゛ 提交于 2019-12-08 02:48:10

问题


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:


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



来源:https://stackoverflow.com/questions/30239305/how-does-sklearns-adaboost-predict-proba-works-internally

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!