Created
October 13, 2021 17:23
-
-
Save liannewriting/93bea0c25da13c3bbacf3ae927e08a59 to your computer and use it in GitHub Desktop.
python imbalanced data machine learning classification
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from imblearn.combine import SMOTETomek | |
smote_tomek = SMOTETomek(random_state=888) | |
X_resampled, y_resampled = smote_tomek.fit_resample(df_train[features], df_train['Class']) | |
y_resampled.value_counts() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment