Machine Learning
A complete, hands-on machine learning course with scikit-learn: the ML workflow, regression, classification, SVMs, tree ensembles and boosting, clustering and PCA, time series, and recommender systems. Interactive playgrounds let you move the weights and watch the model change.
01ML Foundations
What learning from data actually means: KNN, train/test splits, pipelines, EDA, feature engineering, and honest baselines.
- What Is Machine Learning?Rules vs learning, the vocabulary of ML, and the golden rule — never evaluate a model on the data it trained on. 8 min read
- K-Nearest NeighborsYour first classifier — predict by asking the closest examples to vote, and learn why k and feature scaling change everything. 8 min read
- scikit-learn Pipelines & WorkflowThe estimator API, data leakage, and how Pipeline, ColumnTransformer, and GridSearchCV turn your workflow into one tunable, leak-proof object. 8 min read
- EDA & Feature EngineeringInterrogate a dataset before modeling — distributions, missing values, outliers, target balance — then craft features that make models smarter. 9 min read
- Baselines & BenchmarksStart every project with a deliberately dumb model — dummy baselines, the class-imbalance accuracy trap, and fair benchmarking with cross-validation. 8 min read
02Regression
Predicting numbers: linear and polynomial regression, gradient descent, bias–variance, scaling, and regularization.
- Regression MetricsLearn how to measure how good a numeric prediction really is — MAE, MSE, RMSE, R², MAPE, and the residual plots that reveal what the numbers hide. 9 min read
- Linear Regression & Gradient DescentFit your first model by hand, understand loss functions, and watch gradient descent find the best weights automatically. 7 min read
- Polynomial Regression & OverfittingBend a straight line into a curve with polynomial features, and meet the overfitting trap — plus how validation error tells you when to stop. 8 min read
- The Bias–Variance TradeoffWhy models fail in two opposite ways — and how to diagnose which one is happening to you, with validation curves, learning curves, and a cheat sheet. 9 min read
- Feature Scaling & TransformsPut features on a common scale with StandardScaler, MinMaxScaler, and RobustScaler, and tame skewed distributions with log and power transforms. 8 min read
- Regularization: Ridge, Lasso & ElasticNetTame exploding coefficients with L1 and L2 penalties — shrink weights with Ridge, select features with Lasso, and blend both with ElasticNet. 9 min read
03Classification
Predicting categories: metrics beyond accuracy, logistic regression, and multiclass vs multilabel problems.
- Classification Metrics Beyond AccuracyWhy accuracy lies on imbalanced data, and how to read confusion matrices, precision, recall, F1, ROC curves, and precision-recall curves instead. 9 min read
- Logistic RegressionTurn regression into classification with the sigmoid, understand why log-loss beats MSE, and read probabilities and coefficients from a real model. 8 min read
- Multiclass & Multilabel ClassificationGo beyond yes/no questions — One-vs-Rest, One-vs-One, softmax regression, metric averaging for many classes, and models that assign several labels at once. 10 min read
04Support Vector Machines
Maximum-margin classifiers, the kernel trick, and SVMs for regression and classification in practice.
- Support Vector Machines: Maximum MarginWhy the widest street between classes beats any other separating line, what support vectors are, and how the kernel trick bends straight lines around curved data. 9 min read
- SVMs in Practice: Classification & RegressionTune C, gamma, and the kernel with GridSearchCV, see why scaling is non-negotiable, meet SVR's epsilon tube, and learn when to reach for SVMs at all. 9 min read
05Trees & Ensembles
Decision trees, random forests, and boosting — from AdaBoost intuition to gradient boosting and XGBoost.
- Decision TreesLearn how decision trees carve up feature space with if/else questions, how gini impurity picks the best split, and how to read and control a tree in scikit-learn. 9 min read
- Random ForestsTurn one unstable tree into a reliable model by averaging hundreds of randomized trees — bootstrap sampling, random feature subsets, OOB scores, and feature importances. 9 min read
- Ensemble LearningThe general theory behind combining models — voting classifiers, bagging any estimator, stacking with a meta-learner, and the bagging-vs-boosting map. 9 min read
- AdaBoost: Learning from MistakesThe original boosting algorithm — sample re-weighting, decision stumps, and why a sequence of barely-better-than-random learners adds up to a strong model. 9 min read
- Gradient Boosting & XGBoostBoosting as gradient descent in function space — fit trees to residuals, control the learning-rate/tree-count tradeoff, and use HistGradientBoosting and XGBoost like a practitioner. 10 min read
06Unsupervised Learning
Finding structure without labels: K-Means and friends, customer segmentation, PCA, t-SNE, and topic modeling.
- Clustering with K-MeansLearn without labels — step through the K-Means loop, choose k with the elbow and silhouette methods, and know when to reach for DBSCAN instead. 8 min read
- Clustering in the Wild: Segmentation & CompressionTwo real jobs for K-Means — segment customers into personas you can act on, and compress an image by clustering its pixel colors. 9 min read
- PCA: Dimensionality ReductionSqueeze 30 features into 2 with principal component analysis — choose the number of components with explained variance, and use PCA as a preprocessing step. 10 min read
- t-SNE & Topic ModelingVisualize nonlinear structure with t-SNE, learn its caveats, then discover hidden themes in text with LSA and LDA. 12 min read
07Time Series
Trend, seasonality, and noise — decomposing series and building forecasting models.
- Time Series ComponentsDecompose a time series into trend, seasonality, and residual — tell additive from multiplicative patterns, and meet stationarity. 10 min read
- Forecasting ModelsSplit time series without cheating, beat naive baselines with lag features, and meet Holt-Winters and SARIMA — evaluated honestly with MAE and MAPE. 10 min read
08Recommender Systems
Demographic, content-based, and collaborative filtering — the systems behind every 'you might also like'.
- Popularity & Weighted RatingsBuild your first recommender — a "top charts" list that ranks movies fairly by blending average rating with vote count using the IMDB weighted-rating formula. 9 min read
- Content-Based FilteringRecommend "more like this" by turning movie descriptions into TF-IDF vectors and ranking them with cosine similarity — a full search-style recommender in the browser. 10 min read
- Collaborative FilteringLearn taste from behavior alone — build the user-item ratings matrix, predict missing ratings with item-item similarity, and uncover latent factors with SVD. 10 min read
