2

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.

4

1 回答 1

1

也许Adaboost的“它是如何工作的”部分有一些用处?

于 2015-08-04T20:41:59.827 回答