Skip to content

Commit

Permalink
iter
Browse files Browse the repository at this point in the history
  • Loading branch information
glemaitre committed Feb 16, 2021
1 parent 081d1af commit 0debe32
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions examples/applications/plot_multi_class_under_sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
from collections import Counter

from sklearn.datasets import load_iris
from sklearn.svm import LinearSVC
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler

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

# Create a pipeline
pipeline = make_pipeline(NearMiss(version=2), LinearSVC(random_state=RANDOM_STATE))
pipeline = make_pipeline(
NearMiss(version=2), StandardScaler(), LogisticRegression(random_state=RANDOM_STATE)
)
pipeline.fit(X_train, y_train)

# Classify and report the results
Expand Down

0 comments on commit 0debe32

Please sign in to comment.