Skip to content
Prev Previous commit
Next Next commit
iter
  • Loading branch information
glemaitre committed Jun 11, 2019
commit b960ec7c8621f4bdcf09dfcf71b66f5a051fe67a
5 changes: 3 additions & 2 deletions doc/ensemble.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,13 @@ Several methods taking advantage of boosting have been designed.
a boosting iteration [SKHN2010]_::

>>> from imblearn.ensemble import RUSBoostClassifier
>>> rusboost = RUSBoostClassifier(random_state=0)
>>> rusboost = RUSBoostClassifier(n_estimators=200, algorithm='SAMME.R',
... random_state=0)
>>> rusboost.fit(X_train, y_train) # doctest: +ELLIPSIS
RUSBoostClassifier(...)
>>> y_pred = rusboost.predict(X_test)
>>> balanced_accuracy_score(y_test, y_pred) # doctest: +ELLIPSIS
0.74...
0.66...

A specific method which uses ``AdaBoost`` as learners in the bagging classifier
is called EasyEnsemble. The :class:`EasyEnsembleClassifier` allows to bag
Expand Down
15 changes: 15 additions & 0 deletions doc/whats_new/v0.5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ Version 0.5 (under development)
Changelog
---------

Changed models
..............

The following models or function might give different results even if the
same data ``X`` and ``y`` are the same.

* :class:`imblearn.ensemble.RUSBoostClassifier` default estimator changed from
:class:`sklearn.tree.DecisionTreeClassifier` with full depth to a decision
stump (i.e., tree with ``max_depth=1``).

Documentation
.............

Expand Down Expand Up @@ -53,3 +63,8 @@ Bug
- Fix bug in :class:`imblearn.pipeline.Pipeline` where None could be the final
estimator.
:pr:`554` by :user:`Oliver Rausch <orausch>`.

- Fix bug by changing the default depth in
:class:`imblearn.ensemble.RUSBoostClassifier` to get a decision stump as a
weak learner as in the original paper.
:pr:`545` by :user:`Christos Aridas <chkoar>`.
2 changes: 1 addition & 1 deletion imblearn/ensemble/_weight_boosting.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def fit(self, X, y, sample_weight=None):
def _validate_estimator(self):
"""Check the estimator and the n_estimator attribute, set the
`base_estimator_` attribute."""
super(RUSBoostClassifier, self)._validate_estimator()
super()._validate_estimator()

self.base_sampler_ = RandomUnderSampler(
sampling_strategy=self.sampling_strategy,
Expand Down