4 Oversampling and Undersampling Methods for Imbalanced Classification Using Python

Published: 01 October 2021
on channel: Grab N Go Info
9,739
169

Random Oversampling, SMOTE, Random Under-Sampling, and Near Miss Under-Sampling are four widely used sampling techniques to change the ratio of the classes in an imbalanced modeling dataset. This step-by-step tutorial explains how to use oversampling and under-sampling in Python using imblearn library to adjust the imbalanced classes for machine learning classification models. We will compare four methods with the baseline random forest model results and see which method performs better.

After watching this video, you will learn how to use oversampling and under-sampling techniques in imbalanced classification models, and answer the questions of
👉 What is imbalanced classification?
👉 How to decide the model performance metrics?
👉 How to do oversampling using random oversampling and SMOTE?
👉 How to do under-sampling using random under-sampling and Near Miss?
👉 How to compare the performance of oversampling and under-sampling?

Timecodes:
0:00 - Intro
0:30 - What is the imbalanced classification?
1:32 - Step 1: Import Python Libraries
2:24 - Step 2: Create Imbalanced Dataset
3:02 - Step 3: Train Test Split
3:34 - Step 4: Decide Performance Metric
4:20 - Step 5: Baseline Random Forest Model
4:59 - Step 6: Random Oversampling
5:57 - Step 7: SMOTE
6:50 - Step 8: Random Under-sampling
7:41 - Step 9: Near Miss Under-sampling
8:25 - Summary


❤️ Blog post with code for this video
Medium post:   / four-oversampling-and-under-sampling-metho...  
📒 Code Notebook: https://mailchi.mp/f67df192cfd1/85522...
🚛 GrabNGoInfo Machine Learning Tutorials Inventory:   / grabngoinfo-machine-learning-tutorials-inv...  

🏪 Purchase data science and computer science themed products in my Amazon store: https://amzn.to/40HUTsl

✅ Join Medium Membership: If you are not a Medium member and would like to support me to keep creating free content (😄 Buy me a cup of coffee ☕), join Medium membership through this link:   / membership  
You will get full access to posts on Medium for $5 per month, and I will receive a portion of it. Thank you for your support!

🩺 Imbalanced Model & Anomaly Detection Playlist    • Imbalanced Model & Anomaly Detection  

🔥 Check out more machine learning tutorials on my website!
https://grabngoinfo.com/tutorials/
🛎️ SUBSCRIBE to GrabNGoInfo https://bit.ly/3keifBY
📧 CONTACT me at contact@grabngoinfo.com
👩🏻‍💻 Follow me on LinkedIn:   / grabngoinfo  

📣 Speech software used in the video: Descript https://www.descript.com/?lmref=h7XYQw

#frauddetection #machinelearning #datascience #grabngoinfo


On this page of the site you can watch the video online 4 Oversampling and Undersampling Methods for Imbalanced Classification Using Python with a duration of hours minute second in good quality, which was uploaded by the user Grab N Go Info 01 October 2021, share the link with friends and acquaintances, this video has already been watched 9,739 times on youtube and it was liked by 169 viewers. Enjoy your viewing!