Skip to content

Commit 0debe32

Browse files
committed
iter
1 parent 081d1af commit 0debe32

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

examples/applications/plot_multi_class_under_sampling.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@
1515
from collections import Counter
1616

1717
from sklearn.datasets import load_iris
18-
from sklearn.svm import LinearSVC
18+
from sklearn.linear_model import LogisticRegression
1919
from sklearn.model_selection import train_test_split
20+
from sklearn.preprocessing import StandardScaler
2021

2122
from imblearn.datasets import make_imbalance
2223
from imblearn.under_sampling import NearMiss
@@ -42,7 +43,9 @@
4243
print(f"Testing target statistics: {Counter(y_test)}")
4344

4445
# Create a pipeline
45-
pipeline = make_pipeline(NearMiss(version=2), LinearSVC(random_state=RANDOM_STATE))
46+
pipeline = make_pipeline(
47+
NearMiss(version=2), StandardScaler(), LogisticRegression(random_state=RANDOM_STATE)
48+
)
4649
pipeline.fit(X_train, y_train)
4750

4851
# Classify and report the results

0 commit comments

Comments
 (0)