A READING COURSE FROM THE VERY BEGINNINGMachine learning,
Machine learning,
understood.
Start with what a program and a dataset are. Learn how models fit, how to judge predictions, and why data preparation, interpretation, and monitoring matter. Each chapter explains the theory in plain language and walks through Python code line by line.
Begin with the first idea28 long chapters6 connected parts8 cookbook guides0 read in this browser
THE READING ROUTE
From first principles to informed decisions.
01 / 06
First principles
01What learning from data meansStart with programs, examples, patterns, and the difference between learning and memorising.LONG READ ↗02The Python you needRead names, lists, functions, imports, and method calls before meeting a model API.LONG READ ↗03Rows, features, and targetsLearn what one example is, how a table represents it, and what the model is allowed to see.LONG READ ↗04Numbers and uncertaintyUnderstand averages, spread, proportions, and why a sample does not tell the whole story.LONG READ ↗
02 / 06
Learning and evidence
05How a model learnsConnect predictions, adjustable parameters, loss, and the search for a useful rule.LONG READ ↗06Training, validation, and test dataUnderstand why an honest evaluation uses cases the model did not learn from.LONG READ ↗07Baselines and generalisationLearn what a score means by comparing it with simple rules and recognising overfitting.LONG READ ↗08Judging numeric predictionsRead absolute error, squared error, and residuals without mistaking one number for the whole story.LONG READ ↗09Judging category predictionsUnderstand confusion matrices, precision, recall, thresholds, and probability quality.LONG READ ↗
03 / 06
Supervised models
10Learning from nearby examplesUnderstand distance, neighbor count, scaling, and the local nature of k-nearest neighbors.LONG READ ↗11Lines, coefficients, and regularisationSee how numeric features combine into a prediction and why coefficients need context.LONG READ ↗12A linear rule for categoriesUnderstand scores, probabilities, thresholds, and why logistic regression is a classifier.LONG READ ↗13Decision trees and readable rulesFollow a sequence of splits and understand why deep trees memorise.LONG READ ↗14Many models working togetherUnderstand bagging, random forests, boosting, and why combining weak rules can help.LONG READ ↗15Probabilistic and margin classifiersMeet Naive Bayes and support vector machines without treating their names as magic.LONG READ ↗16Neural networks without mystiqueFollow layers, weights, activations, and gradients while keeping data limits in view.LONG READ ↗
04 / 06
Preparing real data
17Scaling and missing valuesLearn which transformations depend on training data and why missing is not the same as zero.LONG READ ↗18Categories are not numbersRepresent labels such as city or product type without inventing an order between them.LONG READ ↗19Feature engineering and selectionUnderstand transformations, interactions, and why more columns do not guarantee more signal.LONG READ ↗20Cross-validation and pipelinesSee how repeated validation, tuning, and bundled preprocessing avoid false confidence.LONG READ ↗
05 / 06
Unsupervised and text
21Finding groups without labelsUnderstand k-means, density-based groups, and why a cluster is not automatically a real category.LONG READ ↗22Reducing dimensions with PCASee how principal components rotate numeric data and what information a projection loses.LONG READ ↗23Turning words into featuresUnderstand token counts, vocabulary, sparse matrices, n-grams, and TF–IDF.LONG READ ↗24Topics, outliers, and hidden structureRead topic models and anomaly scores as exploratory signals rather than objective truth.LONG READ ↗
06 / 06
Responsible systems
25What a prediction can explainDistinguish a model's internal reasons, feature effects, uncertainty, and causal claims.LONG READ ↗26Fairness, bias, and causeUnderstand how labels and sampling can encode unequal outcomes and why prediction differs from intervention.LONG READ ↗27From a fitted model to a live systemUnderstand saved pipelines, input contracts, monitoring, drift, and safe fallback behavior.LONG READ ↗28A complete way to reason about MLBring task, data, baseline, evaluation, model choice, and deployment into one coherent story.LONG READ ↗
THE COMPANION COLLECTION
Code with the whole story.
Eight complete Python workflows show how the chapter ideas connect. Each recipe explains the data, the library calls, the result, and the boundary of what the result proves.
Read the cookbookBuilt with curiosity. By Navan Sami. ↗Machine learning with Python · From examples to trustworthy models.