#39 Machine Learning Specialization [Course 1, Week 3, Lesson 4]

1 Dec 2022 · 9 min
9:01

Andrew Ng explains how to add a penalty term to the cost function that discourages large parameter values and reduces overfitting. A tiny lambda leads to overfitting, an enormous one like 10^10 collapses the model to just the bias term, so you have to pick the right value.

Questions this video answers

Divide lambda times the sum of w_j^2 by 2m (i.e., use (lambda/(2m)) * sum_{j} w_j^2).

No — by convention the bias term b is not penalized (though some implementations may include it).

Lambda = 0 (no regularization) → can overfit; very large lambda (example given: 10^10) → underfit (parameters ≈ 0, model ≈ bias-only).

Chapters

More from LARRUZ

8:49
youtube.com

OpenAI’s New AI Is Doing Things We Barely Understand

2d ago
5:38
youtube.com

DeepSeek Solved AI’s Memory Problem

3d ago
33:17
youtube.com

DeepMind's New AI Just Cracked The Code Of Life

1w ago
3:43
youtube.com

The Billion Dollar AI Advantage Is Disappearing

1w ago
5:14
youtube.com

Claude Opus 5.5 AI: An Incredible Leap Forward

3w ago
5:16
youtube.com

Yes, Jev Is Insane, But There's A Catch

3w ago
5:11
youtube.com

DeepSeek’s Insane New Architecture

3w ago
4:16
youtube.com

Claude Is Now Leaving Invisible Fingerprints In Its Text

1mo ago
9:18
youtube.com

I Never Thought I’d See This Happen

1mo ago
5:22
youtube.com

GPT-6 Astra Changes Everything

1mo ago
4:55
youtube.com

Claude Fable AI Is Much Stranger Than The Headlines Suggest

1mo ago
See all content