Handle highly imbalanced classification data

Quick Overview

This question evaluates a candidate's competency in handling highly imbalanced binary classification problems, including data splitting and leakage prevention, imbalance mitigation techniques, appropriate metric selection and threshold calibration, algorithm selection for scalability, robust validation, and deployment monitoring.

Handle highly imbalanced classification data

Company: Google

Role: Data Scientist

Category: Machine Learning

Difficulty: medium

Interview Round: Technical Screen

You must build a binary classifier for fraud with a 0.2% positive rate and 10M rows × 500 features. Propose an end-to-end plan that covers: 1) data splitting with stratification and leakage prevention; 2) handling imbalance (class weights vs. focal loss, down/over-sampling, SMOTE variants, and when to use each); 3) appropriate metrics and why (PR curve, AUPRC, recall at fixed precision, cost-sensitive metrics) vs. why ROC-AUC is misleading; 4) threshold setting using cost matrices and calibration (Platt/Isotonic) and how you’d do post-deployment threshold tuning; 5) algorithm choices and justification (baseline logistic with class_weight, tree ensembles with balanced subsampling, anomaly detection fallback); 6) robust validation (time-based CV, group CV), data drift monitoring, and rejection rules for extreme edge cases; 7) a brief pseudocode of the training/evaluation loop that scales to this dataset.

Quick Answer: This question evaluates a candidate's competency in handling highly imbalanced binary classification problems, including data splitting and leakage prevention, imbalance mitigation techniques, appropriate metric selection and threshold calibration, algorithm selection for scalability, robust validation, and deployment monitoring.

|Home/Machine Learning/Google
Google logo
Google
Oct 13, 2025, 9:49 PM
mediumData ScientistTechnical ScreenMachine Learning
15
0

You must build a binary classifier for fraud with a 0.2% positive rate and 10M rows × 500 features. Propose an end-to-end plan that covers: 1) data splitting with stratification and leakage prevention; 2) handling imbalance (class weights vs. focal loss, down/over-sampling, SMOTE variants, and when to use each); 3) appropriate metrics and why (PR curve, AUPRC, recall at fixed precision, cost-sensitive metrics) vs. why ROC-AUC is misleading; 4) threshold setting using cost matrices and calibration (Platt/Isotonic) and how you’d do post-deployment threshold tuning; 5) algorithm choices and justification (baseline logistic with class_weight, tree ensembles with balanced subsampling, anomaly detection fallback); 6) robust validation (time-based CV, group CV), data drift monitoring, and rejection rules for extreme edge cases; 7) a brief pseudocode of the training/evaluation loop that scales to this dataset.

Loading comments...