Skip to content

Commit 94b0725

Browse files
sft-managedsft-managed
sft-managed
authored and
sft-managed
committed
change isinstance check for SVM estimator to simply clone the estimator - similar to _validate_estimator() in KMeansSMOTE
1 parent e997e23 commit 94b0725

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

imblearn/over_sampling/_smote/filter.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,10 +345,8 @@ def _validate_estimator(self):
345345

346346
if self.svm_estimator is None:
347347
self.svm_estimator_ = SVC(gamma="scale", random_state=self.random_state)
348-
elif isinstance(self.svm_estimator, SVC):
349-
self.svm_estimator_ = clone(self.svm_estimator)
350348
else:
351-
raise_isinstance_error("svm_estimator", [SVC], self.svm_estimator)
349+
self.svm_estimator_ = clone(self.svm_estimator)
352350

353351
def _fit_resample(self, X, y):
354352
self._validate_estimator()

0 commit comments

Comments
 (0)