PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Machine Learning/LinkedIn

Handle imbalance, sampling, and overfitting

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a data scientist's proficiency in machine learning topics including handling class imbalance, selecting and interpreting evaluation metrics, verifying sample representativeness, preventing overfitting in tree-based models, and understanding why L1/L2 regularization introduces biased coefficient estimates.

  • easy
  • LinkedIn
  • Machine Learning
  • Data Scientist

Handle imbalance, sampling, and overfitting

Company: LinkedIn

Role: Data Scientist

Category: Machine Learning

Difficulty: easy

Interview Round: Technical Screen

## Practical ML questions (classification and generalization) Answer the following ML engineering/data science questions. ### A) Class imbalance You’re training a classifier where the positive class is rare. - How do you handle **class imbalance** (data-level and algorithm-level approaches)? - Which **evaluation metrics** are appropriate and why (e.g., accuracy vs precision/recall/F1/ROC-AUC/PR-AUC)? - What pitfalls should you watch for (e.g., calibration, thresholding, leakage)? ### B) Training on a sample from a very large dataset You train a model on a sample drawn from a massive dataset. - How do you verify the **sample is representative**? - How do you validate that a model trained on the sample will **generalize** to the full population? ### C) Preventing overfitting in tree-based models For decision trees / random forests / gradient-boosted trees: - What knobs and practices help prevent **overfitting**? ### D) Why L1/L2 regularization is biased Explain why L1 (Lasso) and L2 (Ridge) regularization typically produce **biased** coefficient estimates, and why we still use them.

Quick Answer: This question evaluates a data scientist's proficiency in machine learning topics including handling class imbalance, selecting and interpreting evaluation metrics, verifying sample representativeness, preventing overfitting in tree-based models, and understanding why L1/L2 regularization introduces biased coefficient estimates.

Related Interview Questions

  • Explain Logistic Regression, Backprop, and Adam - LinkedIn (medium)
  • Explain variance reduction in random forests - LinkedIn (medium)
  • Answer practical ML foundations questions - LinkedIn (medium)
  • Handle imbalance, validate samples, and avoid overfitting - LinkedIn (easy)
  • Explain activations, losses, and Adam - LinkedIn (medium)
LinkedIn logo
LinkedIn
Feb 16, 2026, 7:49 AM
Data Scientist
Technical Screen
Machine Learning
7
0
Loading...

Practical ML questions (classification and generalization)

Answer the following ML engineering/data science questions.

A) Class imbalance

You’re training a classifier where the positive class is rare.

  • How do you handle class imbalance (data-level and algorithm-level approaches)?
  • Which evaluation metrics are appropriate and why (e.g., accuracy vs precision/recall/F1/ROC-AUC/PR-AUC)?
  • What pitfalls should you watch for (e.g., calibration, thresholding, leakage)?

B) Training on a sample from a very large dataset

You train a model on a sample drawn from a massive dataset.

  • How do you verify the sample is representative ?
  • How do you validate that a model trained on the sample will generalize to the full population?

C) Preventing overfitting in tree-based models

For decision trees / random forests / gradient-boosted trees:

  • What knobs and practices help prevent overfitting ?

D) Why L1/L2 regularization is biased

Explain why L1 (Lasso) and L2 (Ridge) regularization typically produce biased coefficient estimates, and why we still use them.

Solution

Show

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Machine Learning•More LinkedIn•More Data Scientist•LinkedIn Data Scientist•LinkedIn Machine Learning•Data Scientist Machine Learning
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
  • Compare Platforms
  • Discord Community

Support

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

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.