Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
python imbalanced data machine learning classification
from imblearn.over_sampling import RandomOverSampler
ros = RandomOverSampler(random_state=888)
X_resampled, y_resampled = ros.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