InterviewStack.io LogoInterviewStack.io

ML System Evaluation and Metrics Questions

Design comprehensive evaluation strategies including offline metrics (precision, recall, F1, AUC, calibration), online metrics (A/B test setup, statistical significance), and business metrics. Understand metric limitations and how to avoid gaming metrics.

MediumTechnical
58 practiced
A production model appears to perform worse for a small demographic segment. Describe which fairness metrics you would compute (demographic parity, equalized odds, predictive parity, calibration per group), how to visualize disparities, and propose remediation strategies such as reweighting, constrained optimization, or separate models.
MediumSystem Design
83 practiced
Design a near-real-time evaluation and metric pipeline for a fraud detection model that scores 100k events/second. Include logging, aggregation windows, computation of metrics like precision/recall at thresholds, rolling AUC estimates, storage decisions (hot vs cold), latency SLAs, and trade-offs between streaming and batch processing.
MediumTechnical
86 practiced
Implement a Python function roc_auc_score_manual(y_true, y_score) that computes ROC AUC without using sklearn. y_true contains binary labels and y_score contains predicted probabilities. Use the ranking/trapezoidal method: sort by score, compute TPR/FPR curve, then area via trapezoidal rule. Mention how to handle ties.
HardSystem Design
72 practiced
Design a production monitoring and alerting system for ML models that tracks model performance metrics (AUC, calibration, precision/recall at thresholds), data quality, concept drift, latency, and business KPIs. Specify alert thresholds, severity levels, canary and shadow deployment strategy, automated rollback criteria, and include a sample runbook for triaging an alert.
MediumTechnical
83 practiced
Describe methods and metrics to detect concept drift and feature distribution shift in production. Cover univariate statistics (Population Stability Index), divergence measures (KL divergence), model-signal detection (drop in AUC, calibration shifts), and how you would set thresholds and alerts for drift detection in practice.

Unlock Full Question Bank

Get access to hundreds of ML System Evaluation and Metrics interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.