Machine Learning, FoundationsLesson 15 of 92

Module 2 · Linear models and the machinery of fitting

Logistic regression, built from odds rather than assumed

In this lesson

  • 10 min read
  • 7 reading sections
  • Knowledge check
  • Lesson 6 of 10 in this chapter

This chapter’s goalFit and diagnose a linear or logistic model end to end: compute its loss by hand on a handful of rows, tune the learning rate from the shape of the loss curve, state what a coefficient does and does not mean in the units of the data, and explain what ridge and lasso penalties change about the fitted parameters.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmWatch1:58Not available
Full audiobookNot availableNot available

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 9Free · no account needed
Lesson steps

Why not just fit a line to 0 and 1?

You can. It is called the linear probability model, statisticians use it deliberately in some settings, and for a beginner it fails in two visible ways.

Fit y = w*x + b where y is 0 or 1, and the line will happily predict 1.4 and -0.3. Those are not probabilities. Worse, the fit is dragged by the squared-error penalty on points that are already unambiguously classified: a customer the model puts at 0.99 who is a 1 still contributes error, and the line tilts to reduce it, damaging the boundary where the decision actually happens.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the How a Language Model Actually Works exam.

Stuck on something?Ask Funke, your AI tutor

How to cite: Addaly (2026) ‘Logistic regression, built from odds rather than assumed’, in Machine Learning, Foundations. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/machine-learning-foundations/logistic-regression-from-odds (Accessed: 27 November 2026).