Skip to content

Commit 3d6a960

Browse files
authored
Update easy_ensemble_generalization.py
1 parent 6bce8e4 commit 3d6a960

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

imblearn/ensemble/easy_ensemble_generalization.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from sklearn.externals import six
1414
from sklearn.tree import DecisionTreeClassifier
1515
from sklearn.utils import check_random_state
16+
from sklearn.utils.multiclass import check_classification_targets
1617
from sklearn.utils.validation import check_is_fitted
1718

1819

@@ -132,11 +133,10 @@ def fit(self, X, y, sample_weight=None):
132133
Returns self.
133134
"""
134135

135-
random_state = check_random_state(self.random_state)
136-
136+
check_classification_targets(y)
137137
self._validate_estimator()
138138
self._validate_sampler()
139-
139+
140140
random_state = check_random_state(self.random_state)
141141

142142
if not hasattr(self.base_sampler, 'random_state'):

0 commit comments

Comments
 (0)