Skip to content

PRO TIP Block youtube.com at the DNS level — Pi-hole, NextDNS or your hosts file — but allow youtube-nocookie.com and i.ytimg.com. These tutorials keep playing; the rabbit hole does not.

Learning without distractions

Outlier detection and removal using IQR | Feature engineering tutorial python # 4

125.1K views on YouTube

IQR is another technique that one can use to detect and remove outliers. The formula for IQR is very simple. IQR = Q3-Q1. Where Q3 is 75th percentile and Q1 is 25th percentile. Once you have IQR you can find upper and lower limit by removing this formula,
lower_limit = Q1-1.5*IQR
upper_limit = Q3 +1.5*IQR
Anything less than a lower limit or above the upper limit is considered outlier. We will use python pandas to remove outliers on a sample dataset and in the end, as usual, I have an interesting exercise for you to practice

Code & Exercise: https://github.com/codebasics/py/blob/master/ML/FeatureEngineering/3_outlier_IQR/3_outliers_iqr.ipynb
Link for kaggle dataset: https://www.kaggle.com/mustafaali96/weight-height

Topics

00:00 What is percentile and IQR
04:15 Remove outliers using IQR
06:55 Exercise

Do you want to learn technology from me? Check https://resources.codebasics.io/EZdpZl for my affordable video courses.

Website: https://resources.codebasics.io/EZdpZl
Facebook: https://www.facebook.com/codebasicshub
Twitter: https://twitter.com/codebasicshub