Intermediate interview questions in Data Science & Analytics, page 3
Explain k-means user segments to a marketing team
Name each segment, profile its defining traits, show size and value, recommend an action.
Detecting and responding to model and concept drift
Define drift, pick a metric like PSI or falling AUC against labels, then investigate, retrain, validate.
What a feature store solves: skew and consistency
Central repository of computed features, one definition serving training and inference, reuse across models.
ML CI/CD versus traditional software CI/CD
Validates code plus data plus the model, auto-trains and evaluates, adds continuous training and monitoring.
CPU versus GPU serving: cost, latency, throughput
GPUs win on throughput for batched parallel work but cost more; CPUs suit low-volume or small models.
Why version data and model artifacts, not just code
Code alone cannot reproduce a model; data and artifact versioning enable rollback, debugging, audit.
Right to be forgotten and machine unlearning
Delete raw data everywhere, then remove influence via full retraining, SISA sharded retraining, or approximate unlearning; note cost and verification.
k-anonymity and its limits against linkage attacks
Define k-anonymity via indistinguishable quasi-identifier groups, apply generalization and suppression, then show homogeneity or linkage attacks break it.
Risks of optimizing recommendations only for CTR
CTR-only invites clickbait, low satisfaction, and long-term churn; add counter-metrics like dwell time, satisfaction, retention, and diversity.
pandas .apply() versus vectorized operations
Apply runs a Python function per row or column, flexible but slow due to per-element looping; prefer vectorized ops; use apply only for custom logic with no vectorized equivalent.
When should you keep outliers, not drop them?
Keep them in fraud or anomaly detection, use robust models and metrics.
Explain KNN or MICE imputation principles
KNN borrows from similar rows, MICE models each variable from the others iteratively and creates multiple datasets.
Design a SQL upsert from a staging table
Define a stable key, use MERGE or INSERT ON CONFLICT, dedupe the staging set first, run in a transaction.
Handle source schema changes without downtime
Add columns as nullable additive changes, version the schema, use formats like Iceberg or Parquet that support evolution, backfill new types safely.
Primary metric up, guardrail down: ship or not?
Tie metrics to business value, weigh short-term lift against retention damage, use guardrails and an overall evaluation criterion.
Catalyst Optimizer and Project Tungsten in Spark
Catalyst transforms logical plans with rules, picks physical plans by cost; Tungsten optimizes execution with off-heap memory and codegen.
Explain false positives and negatives for churn
False positive flags a loyal customer (wasted incentive), false negative misses a leaver (lost customer), tie to threshold choice.
Design an automated A/B test reporting system
Standardized metric definitions, automated stats with confidence intervals and guardrails, segment breakdowns, a clear ship recommendation.
Explain a loan denial with LIME or SHAP
LIME fits a local surrogate, SHAP attributes the prediction across features via Shapley values, both give per-feature contributions.
repartition() versus coalesce() in Spark
Repartition does a full shuffle and can increase or balance partitions; coalesce avoids a full shuffle and only reduces them.
We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.
See open roles