Google · ML System Design
Build and evaluate bad-link classifier
TrueInterview
October 7, 2026 · 1 min read
You are given 1,000 URLs marked bad or good, plus a far larger unlabeled set, where bad links occur rarely. Build features and fit a logistic regression model. Describe how you would evaluate it under class imbalance: stratified K-fold splits, ROC-AUC versus PR-AUC, calibration via reliability curves, and why accuracy can be misleading. Select a decision threshold by minimizing expected misclassification cost when the costs are asymmetric. Cover class weighting or resampling, leakage checks, monitoring for distribution shift between labeled data and production traffic, and an offline-to-online validation approach using shadow or canary deployment.
Overview: This question tests applied machine learning classification skills: feature engineering, fitting a logistic regression, dealing with severe class imbalance, choosing evaluation metrics and calibration, setting thresholds under asymmetric costs, and planning offline-to-online validation and monitoring.