问题
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