0

I am using an AdaBoostClassifier in Python (from sklearn.ensemble import AdaBoostClassifier) , and i would like to know the weak rules that are chosen by AdaBoost.

This is my source code :

x = np.array(p_values_learn) #Array of 10.000 * 100.000 values are float betweek 0 and 1
y = np.array(verite_learn) #Vector of 100.000 values are 0 or 1
bdt = AdaBoostClassifier(algorithm="SAMME.R", n_estimators=4)
bdt.fit(x, y)

Each estimator is a DecisionTreeClassifier, but i am not able to find informations that i want.

I would like to know the rules details of the decision fuction f(x) :

f(x) = 0.426 I(x37 < 2.5) + 0.64696 I (x250 < 8.5)

That's say, i would like to know which column of my data X is used by the classifier and with which coefficient.

It's a binary decision, classes are 0 or 1.

Thanks.

Pythonas
  • 1
  • 1
  • What library are you using for the AdaBoostClassifier? If it's sklearn does bdt.get_params() give what you want? – user3590169 Mar 10 '15 at 11:13
  • Yes this is sklearn, when i try to use get_params() it gives only : {'n_estimators': 4, 'base_estimator': None, 'random_state': None, 'learning_rate': 1.0, 'algorithm': 'SAMME.R'} – Pythonas Mar 10 '15 at 11:18

1 Answers1

0

I think decision_function(X) is what you were looking for, according to the description: decision_function

TomHan
  • 5
  • 1