148 - 7 techniques to work with imbalanced data for machine learning in python

Published: 11 August 2020
on channel: DigitalSreeni
17,042
405

Imbalanced data is part of life! With a proper knowledge of the data set and a few techniques from this video imbalanced data can be easily managed.

Prerequisites: Pick the right metrics as overall accuracy does not provide information about the accuracy of individual classes. Look at confusion matrix and ROC_AUC.

Technique 0: Collect more data, if possible.
Technique 1: Pick decision tree based approaches as they work better than logistic regression or SVM. Random Forest is a good algorithm to try but beware of over fitting.
Technique 2: Up-sample minority class
Technique 3: Down-sample majority class
Technique 4: A combination of Over and under sampling.
Technique 5: Penalize learning algorithms that increase cost of classification
mistakes on minority classes.
Technique 6: Generate synthetic data (SMOTE, ADASYN)
Technique 7: Add appropriate weights to your deep learning model.

References:
https://imbalanced-learn.org/stable/o...
https://scikit-learn.org/stable/modul...

Code generated in the video can be downloaded from here: https://github.com/bnsreenu/python_fo...


On this page of the site you can watch the video online 148 - 7 techniques to work with imbalanced data for machine learning in python with a duration of hours minute second in good quality, which was uploaded by the user DigitalSreeni 11 August 2020, share the link with friends and acquaintances, this video has already been watched 17,042 times on youtube and it was liked by 405 viewers. Enjoy your viewing!