I'm Farah Ibrar from the United Kingdom, with a BSc in Biomedical Sciences (Hons) and an MSc in Biomedical Sciences (Immunology) from the University of Westminster, London. Transitioning into data analytics and data science, I combine analytical skills with a passion for data-driven problem-solving.
My academic journey sparked a strong interest in data analytics, visualization, and technology, particularly through Bioinformatics and R. During my Master's, my Data Science project on relational database storage for OMICS data solidified this passion. Since then, I have been actively expanding my expertise in data and technology, advancing my programming and data analysis skills through self-learning and online courses.
This Python script automates outlier detection using the Interquartile Range (IQR) method, a robust statistical technique. By calculating the IQR and defining upper and lower bounds, it identifies significant anomalies in datasets. This streamlines data cleaning, ensuring more accurate and reliable analysis.
Click to view my Outlier Detection Code!
import numpy as np
def detect_outliers(data):
q1, q3 = np.percentile(data, [25, 75])
iqr = q3 - q1
lower_bound = q1 - 1.5 * iqr
upper_bound = q3 + 1.5 * iqr
outliers = [x for x in data if x < lower_bound or x > upper_bound]
return outliers
if __name__ == "__main__":
# Example usage:
data = [12, 18, 25, 7, 10, 15, 8, 19, 3, 100, 16] # Example dataset with an outlier (100)
print("Detecting Outliers...")
outliers = detect_outliers(data)
if outliers:
print("Outliers detected:", outliers)
else:
print("No outliers detected.")