Python-first · Theory before code · R edition to follow

Machine Learning A to Z

Every algorithm taught the way a professional needs it: what it is, the intuition, the mathematics, the assumptions it rests on, a worked example by hand, the Python implementation — and how to honestly judge the result.

10
Parts
35
Chapters
31
Algorithms implemented
1,100+
Quiz questions

The Course in Ten Parts

The journey runs from foundations, through the three families of learning, to deep learning and a professional capstone. Each part builds on the ones before it.

🧱Part I

Foundations & Data Preprocessing

ML literacy, the statistics primer, and the preprocessing toolbox — missing data, encoding, scaling, splitting.

Chapters 1–3
📈Part II

Regression

Six regressors from simple OLS to random forests — with the full assumption suite and a dedicated evaluation chapter.

Chapters 4–10
🎯Part III

Classification

Seven classifiers from logistic regression to random forests — plus precision, recall, F1, ROC-AUC and the imbalance story.

Chapters 11–18
🫧Part IV

Clustering

K-Means and hierarchical clustering: customer segmentation with the elbow method and silhouette analysis.

Chapters 19–20
🛒Part V

Association Rule Learning

Apriori and Eclat: support, confidence and lift derived numerically from real market-basket data.

Chapters 21–22
🎰Part VI

Reinforcement Learning

The multi-armed bandit problem: exploration vs exploitation, Upper Confidence Bound and Thompson Sampling.

Chapters 23–24
💬Part VII

Natural Language Processing

Text cleaning, bag of words, TF-IDF and sentiment classification on restaurant reviews.

Chapter 25
🧠Part VIII

Deep Learning

Neural networks from the single neuron to backpropagation, CNNs — convolution, pooling and image classification — then recurrence, LSTM gates and sequence-to-sequence.

Chapters 26–29
📉Part IX

Dimensionality Reduction

PCA, LDA and Kernel PCA: the eigen-mathematics, how many components to keep, and when each method wins.

Chapters 30–32
🏆Part X

Model Selection & Boosting

k-fold cross-validation, grid search, XGBoost — and a capstone that welds the whole course into one pipeline.

Chapters 33–35

All Chapters

Chapters are published in production order. Each ends with a hands-on project and a 30-question self-test.

# Chapter Focus Status Quiz
Part I — Foundations & Data Preprocessing
01 Machine Learning Foundations ML vs statistics vs AI · taxonomy · workflow · toolchain Published 10 MCQs
02 Statistics Primer for Machine Learning Distributions · correlation · hypothesis testing Published 30 MCQs
03 Data Preprocessing in Python Missing data · encoding · scaling · leakage Published 30 MCQs
Part II — Regression
04 Simple Linear Regression OLS derivation · full assumption suite · R² Published 30 MCQs
05 Multiple Linear Regression Dummy trap · multicollinearity & VIF · backward elimination Published 30 MCQs
06 Polynomial Regression & the Bias-Variance Tradeoff Feature expansion · overfitting made visual Published 30 MCQs
07 Support Vector Regression (SVR) ε-insensitive tube · kernels in regression Published 30 MCQs
08 Decision Tree Regression CART splits · variance reduction · depth as complexity Published 30 MCQs
09 Random Forest Regression Bagging · why averaging trees works Published 30 MCQs
10 Evaluating & Comparing Regression Models MAE/MSE/RMSE · residual audits · model benchmarking Published 30 MCQs
Part III — Classification
11 Classification Foundations & Logistic Regression Sigmoid · odds ratios · assumptions · thresholds Published 30 MCQs
12 K-Nearest Neighbors (K-NN) Distance metrics · choosing k · curse of dimensionality Published 30 MCQs
13 Support Vector Machine (SVM) Maximum margin · support vectors · the C parameter Published 30 MCQs
14 Kernel SVM The kernel trick · RBF & gamma · kernel choice Published 30 MCQs
15 Naive Bayes Bayes' theorem from scratch · conditional independence Published 30 MCQs
16 Decision Tree Classification Entropy · information gain · Gini · pruning Published 30 MCQs
17 Random Forest Classification & Ensemble Learning Bagging vs boosting · feature subsampling Published 30 MCQs
18 Evaluating Classifiers: Beyond Accuracy Precision/recall/F1 · ROC-AUC · imbalance · benchmarking Published 30 MCQs
Part IV — Clustering
19 K-Means Clustering Elbow method · silhouette · customer segmentation Published 30 MCQs
20 Hierarchical Clustering Dendrograms · linkage criteria · vs K-Means Published 30 MCQs
Part V — Association Rule Learning
21 Apriori Support · confidence · lift · market-basket analysis Published 30 MCQs
22 Eclat Frequent itemsets · vertical layout · vs Apriori Published 30 MCQs
Part VI — Reinforcement Learning
23 RL Foundations & the Multi-Armed Bandit (UCB) Exploration vs exploitation · confidence bounds · regret Published 30 MCQs
24 Thompson Sampling Beta distributions · Bayesian exploration Published 30 MCQs
Part VII — Natural Language Processing
25 Text Analytics: Bag of Words and Beyond Cleaning · stemming vs lemmatization · TF-IDF · sentiment Published 30 MCQs
Part VIII — Deep Learning
26 Artificial Neural Networks Neuron model · activations · gradient descent · backprop Published 30 MCQs
27 Convolutional Neural Networks (CNN) Convolution · pooling · augmentation · image classification Published 35 MCQs
28 Recurrent Neural Networks Sequences · hidden state · unrolling · BPTT · the vanishing gradient, measured Published 30 MCQs
29 Long Short-Term Memory (LSTM) Gates by hand · the cell-state belt · GRU · seq2seq · text & finance applications Published 30 MCQs
Part IX — Dimensionality Reduction
28 Principal Component Analysis (PCA) Eigenvectors · explained variance · component choice Published 30 MCQs
29 Linear Discriminant Analysis (LDA) Fisher's criterion · supervised reduction · vs PCA Published 30 MCQs
30 Kernel PCA Non-linear structure · RBF projection · method choice Published 30 MCQs
Part X — Model Selection & Boosting
31 Model Selection: k-Fold Cross-Validation & Grid Search Fold mechanics · hyperparameters · honest tuning Published 30 MCQs
32 XGBoost & Gradient Boosting Boosting mechanics · regularisation · parameter guide Published 30 MCQs
33 Capstone: End-to-End ML Project Pipelines · model shortlist · business metrics · deployment Published 30 MCQs

Applied Projects — ML in Equity Research

The course, meet the market: full project lessons that weld the chapters into professional equity-research workflows — real market data, finance concepts taught alongside the code, and honest scoreboards.

# Project Focus Status Quiz
MP1 Headline Sentiment & the Next Day's Move (Chapter 25 companion) Bag of words on finance headlines · does sentiment predict returns? Published 30 MCQs
MP2 Will the Loan Default? (Chapter 26 companion) Keras ANN for credit risk · vs logistic + engineered features · profit threshold Published 30 MCQs
P1 Decision Tree: Stock Momentum Technical indicators · interpretable trading rules · honest limits Published 30 MCQs
P2 Random Forest: Earnings & Price Prediction Ensemble advantage · bagging vs one tree · accuracy vs interpretability Planned —
P3 SVR: Stock Price Regression Support vectors on financial series · scaling · kernel choice Planned —

How to Use This Book

The book is designed for self-study: read in order the first time, use as a reference forever after.

1

Read the theory first

Every chapter opens with definition, intuition and mathematics before any code appears — don't skip ahead to the listings.

2

Run the code yourself

Type or paste each listing into your own notebook and execute it block by block. Reading code is not learning code.

3

Do the hands-on project

Attempt it before opening the walkthrough. The struggle is where the learning happens.

4

Pass the quiz

Score 8/10 or better before moving on; retake after re-reading the sections you missed.

📝
Note: Content sections carry stability badges — Core (evergreen theory), Stable (reviewed twice a year) and Volatile (reviewed quarterly) — so you always know how much to trust library-specific details.