Skip to content

Commit 5e56e88

Browse files
authored
MNT synchronize boosting algorithm (#642)
1 parent dd287c3 commit 5e56e88

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

imblearn/ensemble/_bagging.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ class BalancedBaggingClassifier(BaggingClassifier):
8787
base_estimator_ : estimator
8888
The base estimator from which the ensemble is grown.
8989
90+
n_features_ : int
91+
The number of features when `fit` is performed.
92+
9093
estimators_ : list of estimators
9194
The collection of fitted base estimators.
9295

imblearn/ensemble/_weight_boosting.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ class RUSBoostClassifier(AdaBoostClassifier):
5959
6060
Attributes
6161
----------
62+
base_estimator_ : estimator
63+
The base estimator from which the ensemble is grown.
64+
6265
estimators_ : list of classifiers
6366
The collection of fitted sub-estimators.
6467
@@ -325,7 +328,7 @@ def _boost_discrete(self, iboost, X, y, sample_weight, random_state):
325328
sample_weight *= np.exp(
326329
estimator_weight
327330
* incorrect
328-
* ((sample_weight > 0) | (estimator_weight < 0))
331+
* (sample_weight > 0)
329332
)
330333

331334
return sample_weight, estimator_weight, estimator_error

0 commit comments

Comments
 (0)