Machine Learning from Scratch Cover
Released

For

Data scientists, ML engineers, AI engineers, researchers, students, quants, and anyone serious about understanding machine learning at a fundamental level.

Machine Learning from Scratch

A Complete Guide to Machine Learning, Optimization and AI: Mathematical Foundations and Practical Implementations

43h 27m total read time
66 of 67 chapters published

About This Book

What separates a data scientist who truly understands their craft from one who merely applies black-box tools? The answer lies in mastering the mathematics and intuition behind every algorithm. This comprehensive handbook bridges the gap between theoretical foundations and black-box function calling, giving you the deep understanding that transforms good practitioners into exceptional ones.

From the elegant simplicity of linear regression to the sophisticated power of gradient boosting and neural networks, every concept is built from first principles. You won't just learn how to use scikit-learn. You'll understand exactly what happens under the hood when you call fit() and predict(). Each algorithm is derived mathematically, explained intuitively, and implemented in clean, Python code.

Track Your Progress

Sign in to mark chapters as complete, track quiz scores, and see your reading journey

Sign in →

Table of Contents

Statistics 101

11 chapters
1

Types of Data

Complete guide to data classification - quantitative, qualitative, discrete & continuous

15m
2

Descriptive Statistics

Complete guide to summarizing and understanding data with measures of central tendency, variability, and distribution shape

26m
3

Probability Basics

Foundation of statistical reasoning covering random variables, probability distributions, expected value, variance, and conditional probability

50m
4

Central Limit Theorem

Foundation of statistical inference covering convergence behavior, sample size requirements, and practical applications in data science

49m
5

Data Sampling

Complete guide to sampling theory and methods covering simple random sampling, stratified sampling, cluster sampling, sampling error, and uncertainty quantification

16m
6

Variable Relationships

Complete guide to covariance, correlation, and regression analysis covering how to measure, model, and interpret variable associations

27m
7

Probability Distributions

Complete guide to normal, t-distribution, binomial, Poisson, exponential, and log-normal distributions with practical applications

18m
8

Data Visualization

Complete guide to histograms, box plots, and scatter plots for exploratory data analysis

19m
9

Data Quality

Complete guide to data quality and outliers covering measurement error, bias, missing data, and imputation

35m
10

Statistical Inference

Complete guide to drawing conclusions from data covering point and interval estimation, confidence intervals, hypothesis testing, and p-values

25m
11

Statistical Modelling

Complete guide to building and evaluating predictive models covering model fit metrics, bias-variance tradeoff, and cross-validation

21m

Hypothesis Testing

11 chapters
12

P-values and Hypothesis Test Setup

Foundation of hypothesis testing covering p-values, null and alternative hypotheses, one-sided vs two-sided tests, and test statistics

22m
13

Confidence Intervals and Test Assumptions

Mathematical equivalence between confidence intervals and hypothesis tests, test assumptions, and choosing between z and t tests

25m
14

The Z-Test

Complete guide to z-tests including one-sample, two-sample, and proportion tests

24m
15

The T-Test

Complete guide to t-tests including one-sample, two-sample (pooled and Welch), paired tests, assumptions, and decision framework

31m
16

The F-Test and F-Distribution

F-distribution, F-test for comparing variances, F-test in regression, and nested model comparison

25m
17

ANOVA (Analysis of Variance)

One-way ANOVA, post-hoc tests, assumptions, and when to use ANOVA

24m
18

Type I and Type II Errors

Understanding false positives, false negatives, statistical power, and the tradeoff between error types

33m
19

Sample Size, Minimum Detectable Effect, and Power

Power analysis, sample size determination, MDE calculation, and avoiding underpowered studies

31m
20

Effect Sizes and Statistical Significance

Cohen's d, practical significance, interpreting effect sizes, and why tiny p-values can mean tiny effects

20m
21

Multiple Comparisons

Family-wise error rate, false discovery rate, Bonferroni correction, Holm's method, and Benjamini-Hochberg procedure

28m
22

Summary and Practical Guide to Hypothesis Testing

Practical reporting guidelines, summary of key concepts, test selection parameters table, multiple comparison corrections table, and scipy.stats functions reference

18m

Foundations

6 chapters

Regression Models

12 chapters

Tree-Based Models

6 chapters

Explainability

5 chapters

Unsupervised Learning

5 chapters

Time Series

5 chapters

Optimization

5 chapters

Appendix

1 chapter
67

Applications of CLT

Soon

Reference

BIBTEXAcademic
@book{machinelearningfromscratch, author = {Michael Brenndoerfer}, title = {Machine Learning from Scratch}, year = {2025}, url = {https://mbrenndoerfer.com/books/machine-learning-from-scratch}, publisher = {mbrenndoerfer.com}, note = {Accessed: 2025-01-01} }
APAAcademic
Michael Brenndoerfer (2025). Machine Learning from Scratch. Retrieved from https://mbrenndoerfer.com/books/machine-learning-from-scratch
MLAAcademic
Michael Brenndoerfer. "Machine Learning from Scratch." 2026. Web. today. <https://mbrenndoerfer.com/books/machine-learning-from-scratch>.
CHICAGOAcademic
Michael Brenndoerfer. "Machine Learning from Scratch." Accessed today. https://mbrenndoerfer.com/books/machine-learning-from-scratch.
HARVARDAcademic
Michael Brenndoerfer (2025) 'Machine Learning from Scratch'. Available at: https://mbrenndoerfer.com/books/machine-learning-from-scratch (Accessed: today).
SimpleBasic
Michael Brenndoerfer (2025). Machine Learning from Scratch. https://mbrenndoerfer.com/books/machine-learning-from-scratch

Stay updated

Get notified when I publish new articles on data and AI, private equity, technology, and more.

No spam, unsubscribe anytime.

or

Create a free account to unlock exclusive features, track your progress, and join the conversation.

No popupsUnobstructed readingCommenting100% Free