L1 L2 Penalty — Google Cloud ML Engineer Practice Questions
L1 (Lasso) and L2 (Ridge) penalties are the two dominant regularization strategies, each adding a different term to the loss function to penalize large weights. L1 adds the sum of absolute weight values, which encourages sparsity by driving some weights exactly to zero and thus performing implicit feature selection. L2 adds the sum of squared weight values, which shrinks weights smoothly toward zero without eliminating features entirely. The ML Engineer exam tests when to prefer each approach, for example using L1 when you suspect many irrelevant features and L2 when most features are expected to contribute, and how to configure these penalties in BigQuery ML and Vertex AI custom training.
Free questions on l1 l2 penalty
How does regularization help prevent overfitting in machine learning models?
Free question · medium · full answer + explanation
More l1 l2 penalty questions in the full bank
- How does regularization help in machine learning models? Unlock answer & explanation →
- How does regularization prevent overfitting? Unlock answer & explanation →
- What is the primary purpose of regularization in machine learning? Unlock answer & explanation →