Last active
January 2, 2023 16:35
-
-
Save sukanyabag/7ef98db711ff4b5257c0f42971478378 to your computer and use it in GitHub Desktop.
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 | |
# Implementing Oversampling for Handling Imbalanced | |
smk = SMOTETomek(random_state=42) | |
X_res,y_res=smk.fit_sample(X,Y) | |
os_us = SMOTETomek(ratio=0.5) | |
X_train_res1, y_train_res1 = os_us.fit_sample(X, Y) | |
X_train_res1.shape,y_train_res1.shape |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment