fix class ordering in two-class

This commit is contained in:
Noel Dawe 2013-01-15 13:30:14 +01:00
parent cdfbd5a1f0
commit dcd66a8a8a
2 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ pl.legend(loc='upper right')
pl.xlabel("Decision Boundary")
# Plot the class probabilities
class_proba = bdt.predict_proba(X)[:, 0]
class_proba = bdt.predict_proba(X)[:, -1]
pl.subplot(132)
for i, n, c in zip(xrange(2), class_names, plot_colors):
pl.hist(class_proba[y == i],

View File

@ -695,7 +695,7 @@ class AdaBoostClassifier(BaseWeightBoosting, ClassifierMixin):
if i == n_estimators:
break
purities = estimator.predict_proba(X)[:, 0]
purities = estimator.predict_proba(X)[:, -1]
norm += weight
if output is None: