PracHub
QuestionsCoachesLearningGuidesInterview Prep
|Home/Machine Learning/Google

Handle p≈n linear regression with L1

Last updated: Mar 29, 2026

Quick Overview

This question evaluates competence in high-dimensional linear regression, penalized estimation (L1/L2/elastic net), preprocessing and feature handling, cross-validation-based model selection, behavior with correlated predictors, and implications for post-selection inference.

  • Medium
  • Google
  • Machine Learning
  • Data Scientist

Handle p≈n linear regression with L1

Company: Google

Role: Data Scientist

Category: Machine Learning

Difficulty: Medium

Interview Round: Technical Screen

You must fit linear regression with p = 500 predictors and n = 600 observations. What failure modes do you expect and why does OLS overfit when p is comparable to n? Write the L1-regularized objective (Lasso), explain its geometric effect on coefficients, and discuss behavior under correlated predictors (grouping vs instability). Describe how you would select λ (K-fold cross-validation with a one-standard-error rule), how you would preprocess features (centering, scaling, handling categorical variables), and how you would evaluate generalization (nested CV, held-out R²). Contrast L1 with L2 and elastic net for p ≈ n and p ≥ n, and note any implications for inference (post-selection bias).

Quick Answer: This question evaluates competence in high-dimensional linear regression, penalized estimation (L1/L2/elastic net), preprocessing and feature handling, cross-validation-based model selection, behavior with correlated predictors, and implications for post-selection inference.

Related Interview Questions

  • Explain ranking cold-start strategies - Google (medium)
  • Explain LLM fine-tuning and generative models - Google (medium)
  • Compare NLP tokenization and LLM recommendations - Google (medium)
  • Explain LLM lifecycle and trade-offs - Google (medium)
  • Build a bigram next-word predictor with weighted sampling - Google (medium)
|Home/Machine Learning/Google

Handle p≈n linear regression with L1

Google logo
Google
Oct 13, 2025, 9:49 PM
MediumData ScientistTechnical ScreenMachine Learning
13
0
Loading...

You must fit linear regression with p = 500 predictors and n = 600 observations. What failure modes do you expect and why does OLS overfit when p is comparable to n? Write the L1-regularized objective (Lasso), explain its geometric effect on coefficients, and discuss behavior under correlated predictors (grouping vs instability). Describe how you would select λ (K-fold cross-validation with a one-standard-error rule), how you would preprocess features (centering, scaling, handling categorical variables), and how you would evaluate generalization (nested CV, held-out R²). Contrast L1 with L2 and elastic net for p ≈ n and p ≥ n, and note any implications for inference (post-selection bias).

Loading comments...

Browse More Questions

More Machine Learning•More Google•More Data Scientist•Google Data Scientist•Google Machine Learning•Data Scientist Machine Learning

Write your answer

Your first approved answer each day earns 20 XP.

Sign in to write your answer.
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.