Last active
April 5, 2020 02:20
-
-
Save f-rumblefish/89f5229f4be05c41e8777c31b65bd0bf to your computer and use it in GitHub Desktop.
Audio Balancing
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
# import library | |
from imblearn.over_sampling import SMOTE | |
# define the environment variable | |
seed = 100 | |
k = 1 | |
# apply SMOTE to create the new dataset | |
sm = SMOTE(sampling_strategy='auto', k_neighbors=k, random_state=seed) | |
X_res, y_res = sm.fit_resample(pd_mfcc, pd_label) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment