Linear Regression

Linear regression draws the best straight line through your data. It is the "hello world" of machine learning.

Build 1.5 hr Python

Prerequisites: Phase 1 (Linear Algebra, Calculus, Optimization), Phase 2 Lesson 1

#Learning Objectives

  • Derive the gradient descent update rules for mean squared error and implement linear regression from scratch
  • Compare gradient descent and the normal equation in terms of computational complexity and when to use each
  • Build a multiple linear regression model with feature standardization and interpret the learned weights
  • Explain how Ridge regression (L2 regularization) prevents overfitting by penalizing large weights
Full Access lesson

Keep going. The rest of this lesson is one step away.

Unlock all 503 lessons, video, code, quizzes and every future update. Pay in your own currency with Paystack.

The text and code of this lesson are based on AI Engineering from Scratch by Rohit Ghumare, MIT licensed.