01Chapter 1: What classification asks of a modelClassification means predicting which category an example belongs to, such as spam or not spam. This chapter defines the task and the vocabulary the rest of the tutorial uses. It also sets up the question that logistic regression answers.2 min read
02Chapter 2: Why a straight line is the wrong tool for labelsThis chapter assumes you know linear regression, the idea of a loss function, and basic NumPy. You will see why fitting a line to 0/1 labels breaks down. That motivates the model in the next chapters.2 min read
03Chapter 3: From probability to odds to log-oddsThis chapter assumes you know basic probability and have seen linear regression. The previous chapter showed that a straight line can predict values outside 0 to 1, so it cannot output a probability directly. Here you will change the quantity being modeled so that a linear score does make sense.2 min read
04Chapter 4: The sigmoid: turning a score into a probabilityThis chapter assumes you know basic Python and NumPy, linear regression, and conditional probability. It also assumes you have seen odds and log-odds in the previous chapter.2 min read
05Chapter 5: Decision boundaries and the 0.5 thresholdThis chapter assumes you know the sigmoid function and the model p = σ(w·x + b) from the previous chapter. You should also be comfortable with NumPy arrays.2 min read
06Chapter 6: Fitting by maximum likelihoodThis chapter assumes you know the sigmoid model from the previous chapters, basic probability (independent events, products of probabilities), and how to read NumPy code. The question here is how to choose the weights and bias.2 min read
07Chapter 7: Log loss as the training objectiveThis chapter assumes you know the sigmoid model, which maps a linear score to a probability p. It also assumes you have seen the idea of a loss function and the basics of maximum likelihood.2 min read
08Chapter 8: Minimizing the loss with gradient descentThis chapter assumes you know derivatives, the idea of a gradient, and the log loss from the previous chapter. It explains how gradient descent uses the gradient to find good weights. The next chapter works out the gradient of log loss itself.2 min read
09Chapter 9: The gradient of log loss and a NumPy implementationThis chapter assumes you know Python and NumPy, can take a basic derivative, and have seen log loss as the training objective. Here you derive its gradient and turn it into a working training loop.2 min read
10Chapter 10: Scaling features for stable trainingThis chapter assumes you know the sigmoid model, log loss, and the batch gradient descent update from the earlier chapters. It also assumes basic NumPy.2 min read
12Chapter 12: Reading coefficients as log-odds and odds ratiosThis chapter assumes you know the sigmoid model and the link between probability, odds, and log-odds. It also assumes you can fit a scikit-learn pipeline. Here you learn to say what a fitted coefficient means.2 min read
13Chapter 13: Measuring performance: accuracy, precision, recall, ROC AUCThis chapter assumes you can fit a logistic regression, split data into train and test sets, and read a predicted probability. Here you will learn which numbers describe how well a classifier works, and when each one misleads.2 min read
14Chapter 14: Choosing a threshold for your costsThis chapter assumes you can fit a scikit-learn logistic regression and read a confusion matrix. You should know precision (the share of predicted positives that are correct) and recall (the share of actual positives that are found).2 min read
15Chapter 15: An end-to-end scikit-learn pipelineThis chapter assumes you know Python, NumPy, train/test splits, and the log loss and L2 penalty from earlier chapters. Here you combine them into one workflow with scikit-learn.2 min read
16Chapter 16: Handling imbalanced classesThis chapter assumes you know how to fit a logistic regression in scikit-learn, and that you understand precision, recall, and decision thresholds from earlier chapters.2 min read
17Chapter 17: Checking whether probabilities can be trustedThis chapter assumes you can fit a logistic regression in scikit-learn and read log loss, precision and recall. It covers two things. First, how to test whether a predicted 0.8 really means 80%. Second, how the model extends to more than two classes.2 min read
18Chapter 18: Assumptions, perfect separation, and when to move onThis chapter assumes you can fit a logistic regression with scikit-learn and that you know log loss, L2 regularization, and odds ratios from earlier chapters. It covers what the model takes for granted, how it fails when classes separate cleanly, and when another model is the better choice.2 min read