
Fundamental Machine Learning
Exploring the foundations of machine learning, from basic algorithms to advanced neural networks.
Foundations of ML
Post 1•Ch.1: What is Machine Learning?
An original deep dive into the paradigm shift of machine learning, why traditional programming fails for complex problems, and the catalysts driving the AI revolution today.
- Post 2•
Ch.2: AI vs. ML vs. Deep Learning
Unpacking the differences between Artificial Intelligence, Machine Learning, Deep Learning, and Reinforcement Learning using a game bot analogy.
- Post 3•
Ch.3: Types of Machine Learning
An in-depth look at the four main types of Machine Learning: Supervised, Unsupervised, Semi-supervised, and Reinforcement Learning.
Learning Paradigms
Post 4•Ch.4: Batch vs. Online Learning
Understanding how Machine Learning models are trained for production environments, with a deep dive into Batch (Offline) Learning and its limitations.
- Post 5•
Ch.5: Online Machine Learning
A deep dive into Online Learning, how models learn incrementally in production, use cases like concept drift and out-of-core learning, and the associated risks.
- Post 6•
Ch.6: Instance-Based vs. Model-Based Learning
Understanding how Machine Learning algorithms learn from data by either memorizing instances or generalizing through mathematical models.
ML Engineering & Data Basics
Post 7•Ch.7: Challenges in Machine Learning
A comprehensive look at the top 10 challenges you will face when building real-world machine learning models, from data collection issues to deployment costs.
- Post 8•
Ch.8: Machine Learning Development Life Cycle (MLDLC)
A comprehensive, 9-step roadmap to building end-to-end Machine Learning products, taking you from problem framing all the way to cloud deployment and testing.
- Post 9•
Ch.9: Tensors in Machine Learning
An introduction to Tensors, the fundamental data structure of Machine Learning and Deep Learning, covering 0D to 5D tensors with practical examples.
Problem Framing & EDA
Post 10•Ch.10: Framing a Machine Learning Problem
A comprehensive guide on how to translate a business problem into a machine learning problem, using a Netflix churn rate case study.
- Post 11•
Ch.11: Asking the Right Questions to Understand Your Data
A practical guide to the initial step of data understanding: 7 fundamental questions to inspect dataset shape, bias, memory, missing values, summary statistics, duplicates, and correlation.
- Post 12•
Ch.12: Univariate Data Analysis: Exploring Categorical and Numerical Features
A comprehensive guide to Univariate Data Analysis in EDA: understanding data types, visualizing categorical distributions with count plots and pie charts, analyzing numerical distributions using histograms, KDE plots, box plots, 5-number summary, and skewness.
Feature Engineering
Post 13•Ch.14: Introduction to Feature Engineering: Concepts, Taxonomy, and ML Lifecycle
A comprehensive guide to Feature Engineering in Machine Learning: understanding its definition, role in the ML lifecycle, and exploring its 4 major pillars (Transformation, Construction, Selection, and Extraction).
- Post 14•
Ch.15: Feature Scaling: Standardization (Z-Score Normalization)
A comprehensive guide to Feature Scaling and Standardization: understanding why feature scaling is necessary, the mathematics of Z-score normalization, mean centering, variance scaling, preventing data leakage, and algorithmic sensitivity.
Problem Framing & EDA
Post 15•Ch.13: Bivariate and Multivariate Data Analysis: Visualizing Feature Interactions
A comprehensive guide to Bivariate and Multivariate Data Analysis in EDA: analyzing Numerical vs Numerical, Numerical vs Categorical, and Categorical vs Categorical feature interactions using Seaborn plots, heatmaps, cross-tabulations, pair plots, and cluster maps.
Feature Engineering
Post 16•Ch.16: Feature Scaling: Normalization (Min-Max Scaling)
A comprehensive guide to Normalization in Feature Scaling: the Min-Max Scaling formula and geometric intuition, a hands-on walkthrough on the Wine dataset, Mean Normalization, Max Absolute Scaling, Robust Scaling, and when to choose Normalization over Standardization.
- Post 17•
Ch.17: Encoding Categorical Data: Ordinal Encoding and Label Encoding
A practical guide to handling categorical data in machine learning: understanding Nominal vs. Ordinal data, Ordinal Encoding for ordered input features, Label Encoding for target columns, the key difference between the two, and a hands-on walkthrough with scikit-learn.
- Post 18•
Ch.18: Encoding Categorical Data: One-Hot Encoding
A practical guide to One-Hot Encoding for nominal categorical data: why Ordinal and Label Encoding break down for unordered categories, the Dummy Variable Trap and multicollinearity, pandas get_dummies vs. scikit-learn's OneHotEncoder, and how to handle high-cardinality columns.
- Post 19•
Ch.19: ColumnTransformer: Applying Multiple Preprocessing Steps in One Shot
How scikit-learn's ColumnTransformer replaces the tedious manual work of imputing, encoding, and reassembling columns one at a time, with a hands-on comparison of the manual approach vs. a single ColumnTransformer call.
- Post 20•
Ch.20: Pipelines: Chaining Preprocessing and Modeling Into One Object
How scikit-learn's Pipeline chains imputation, encoding, scaling, feature selection, and a model into a single object, why the manual alternative falls apart the moment you deploy, and how to visualize, inspect, and ship a fitted pipeline.
- Post 21•
Ch.21: Function Transformer: Reshaping Skewed Data with Math
A beginner-friendly guide to mathematical feature transformations in scikit-learn: why some models want normally distributed data, how to check if a column is skewed, and how to fix it with Log, Reciprocal, Square, and Square Root transforms using FunctionTransformer.
- Post 22•
Ch.22: Power Transformer: Letting Math Pick the Best Transform for You
How scikit-learn's PowerTransformer automatically searches for the best exponent to reshape a skewed column toward a normal distribution, using Box-Cox and Yeo-Johnson, and why Yeo-Johnson also handles zero and negative values that Box-Cox can't.
- Post 23•
Ch.23: Discretization and Binarization: Turning Numbers into Categories
A beginner-friendly walkthrough of converting numerical columns into categorical ones using scikit-learn: Equal Width, Equal Frequency, and K-Means binning with KBinsDiscretizer, plus threshold-based Binarization with Binarizer.
- Post 24•
Ch.25: Working with Date and Time Columns in Feature Engineering
A beginner-friendly walkthrough of extracting features from datetime columns in pandas: converting object columns with pd.to_datetime, pulling out year, month, day, day of week, is_weekend, week number, quarter, and semester, extracting hour/minute/second from timestamps, and computing elapsed time between two dates using timedelta and np.timedelta64, demonstrated on real NYC taxi trip data.
- Post 25•
Ch.24: Handling Mixed Variables: When One Column Hides Two Kinds of Data
A beginner-friendly walkthrough of mixed variables in feature engineering: columns that pack a category and a number into the same cell (Titanic's Cabin and Ticket), or that mix rows of numbers with rows of pure category (a family-count column with an 'Alone' label), handled with pandas string methods, regex extraction, and pd.to_numeric.
Handling Missing Data
Post 26•Ch.26: Handling Missing Data with Complete Case Analysis
A beginner-friendly introduction to handling missing data in machine learning, starting with Complete Case Analysis (CCA): what it is, when the MCAR assumption and the 5% rule make it safe to use, and how to verify it with pandas by comparing distributions and category ratios before and after dropping rows, demonstrated on a real data science job applicant dataset.
- Post 27•
Ch.27: Numerical Imputation with Mean, Median, Arbitrary Value, and End of Distribution
A beginner-friendly walkthrough of univariate imputation for numerical columns: filling missing values with mean or median, an arbitrary out-of-range value, or a value at the end of the distribution, with pandas and scikit-learn's SimpleImputer plus ColumnTransformer, and a look at how each technique distorts variance, distribution shape, and correlation, demonstrated on the Titanic dataset.
- Post 28•
Ch.28: Categorical Imputation with Most Frequent Category and Missing Category
A beginner-friendly walkthrough of univariate imputation for categorical columns: filling missing values with the most frequent category (mode) versus creating a new 'Missing' category, when each one is appropriate, and how mode imputation can badly distort a column's category proportions when no single category dominates, demonstrated with scikit-learn's SimpleImputer on the Ames housing dataset.
- Post 29•
Ch.29: Random Sample Imputation, Missing Indicator, and Automatic Parameter Selection
A beginner-friendly walkthrough of random sample imputation for numerical and categorical columns, why it preserves distribution shape and variance far better than mean/median or mode imputation, the reproducibility trap it introduces in production, scikit-learn's MissingIndicator for flagging which rows were incomplete, and using GridSearchCV to automatically pick the best imputation strategy instead of guessing.
- Post 30•
Ch.30: KNN Imputer and Multivariate Imputation
A beginner-friendly walkthrough of the KNN Imputer, scikit-learn's first multivariate imputation technique: how nan-aware Euclidean distance finds the nearest rows despite missing values, how uniform vs. distance-weighted averaging fills the gap, a hand-worked example on real Titanic rows, a comparison against mean imputation on accuracy and on how well each preserves correlation between columns, and the memory/speed cost that comes with it.
- Post 31•
Ch.31: Iterative Imputer (MICE)
A hand-worked walkthrough of Multivariate Imputation by Chained Equations (MICE): why it assumes data is Missing at Random, how it treats every missing column as a regression target predicted from the rest, why the fill values fluctuate before settling down, a real convergence run on the 50 Startups dataset, and a scikit-learn IterativeImputer comparison against mean and KNN imputation on Titanic.
Handling Outliers
Post 32•Ch.32: Introduction to Outliers in Machine Learning
A comprehensive foundational guide to outliers in feature engineering: what they are, why they distort weight-based machine learning models, when to remove vs. keep them, which algorithms are sensitive vs. robust, four main treatment strategies (trimming, capping, missing value imputation, discretization), and three primary detection frameworks (Z-score, IQR rule, percentile thresholds).
- Post 33•
Ch.33: Z-Score Method for Outlier Detection and Removal
A complete step-by-step guide to detecting and handling outliers using the Z-score and 3-sigma rule: mathematical assumptions, distribution check on a real placement dataset, Z-score standard transformation formulas, and practical Python implementations of both Trimming and Capping (Winsorization).
- Post 34•
Ch.34: IQR Method for Outlier Detection and Removal
A complete guide to detecting and handling outliers in skewed distributions using the IQR Proximity Rule: understanding box plots and quartiles, computing Q1/Q3/IQR boundaries, and applying Trimming and Capping on a real placement dataset.
- Post 35•
Ch.35: Percentile Method for Outlier Detection and Removal
A complete guide to detecting and handling outliers using the Percentile Method (Winsorization): understanding percentile thresholds, computing rank-based boundaries without any distributional assumption, and applying Trimming and Capping on a real height dataset.
Feature Construction & Extraction
Post 36•Ch.36: Feature Construction and Feature Splitting
How to manually engineer new features from existing ones (Feature Construction) and how to break apart columns that pack multiple pieces of information into a single cell (Feature Splitting), demonstrated on the Titanic dataset with real accuracy numbers.
- Post 37•
Ch.37: The Curse of Dimensionality, Feature Selection, and Feature Extraction
Why adding more features to a model can hurt rather than help: the Curse of Dimensionality explained from first principles, the optimal-feature-count plateau, how sparse high-dimensional space breaks distance-based algorithms, and the two solution paths (Feature Selection vs Feature Extraction) that make up the final pillars of feature engineering.
- Post 38•
Ch.38: Principal Component Analysis, Part 1 - Geometric Intuition and Variance
Building intuition for PCA from the ground up: why feature selection breaks down on correlated columns, the geometric idea of rotating axes to find new ones, and why variance is the exact quantity PCA maximizes, illustrated with real generated plots.
- Post 39•
Ch.39: Principal Component Analysis, Part 2 - The Math Behind It
Turning PCA's geometric intuition into a real optimization problem: projections, the variance objective, covariance matrices, and why eigenvectors of the covariance matrix are exactly the axes PCA is looking for, ending with a full code walkthrough on real 3D data.
- Post 40•
Ch.40: PCA in Practice - MNIST, Visualization, and Where It Breaks Down
Applying sklearn's PCA to the real MNIST digit dataset for both dimensionality reduction and 2D visualization, then closing out the series with the three shapes of data where PCA simply doesn't help.
