Explain Regularization Strength Through the Bias-Variance Trade-off

Last updated: November 29, 2026

Quick Overview

You fit logistic regression for predicting whether a Google Maps user will leave a review, and vary the L2 penalty from tiny to huge. Describe what happens to training and validation loss and how you would choose the penalty.

Google
Machine Learning
Data Scientist
Google
November 29, 2026
Data Scientist
Phone Screen
Machine Learning
Easy

0

0

0 solved


You fit logistic regression for predicting whether a Google Maps user will leave a review, and vary the L2 penalty from tiny to huge. Describe what happens to training and validation loss and how you would choose the penalty.

Phone screens for Google data scientists often start with fundamentals before getting product-specific. The interviewer is checking a clear mental model of bias and variance and a sound tuning procedure.

What the Interviewer Expects
  • Describe the loss with L2 penalty
  • Explain training loss rising and validation loss U-shape as lambda grows
  • Connect to bias and variance explicitly
  • Choose lambda by cross-validation or held-out set
  • Contrast L1 vs L2 effects on coefficients
Key Topics to Cover
Bias-variance trade-off
L2 regularization
Cross-validation
Logistic regression
Overfitting
How to Approach This
  1. Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
  2. Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
  3. Feature engineering is often more impactful than model selection.
  4. Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
  5. Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
  • Why do features need to be standardized before applying L2?
  • When would you prefer L1?
  • How does the amount of data change the best lambda?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Explore ML Interview Prep
Sample Answer
Clarify

Assume many features (user history, place category, visit duration, some sparse one-hot ids) and a few hundred thousand examples....

Approach

Write the objective, then walk lambda from 0 to large and describe both curves, then the selection procedure....


Submit Your Answer
Markdown supported