KatInterview

Two ML Cases: Predicting Flight Lateness and Screening Faces Against a Watchlist

Machine LearningModel answer
MediumModel answerMachine Learningregressionlabel-leakagetime-series-validation

Last updated

Design two ML systems end to end: a regression model forecasting flight departure lateness two hours out, and an open-set face-matching pipeline that flags watchlist individuals at a bank entrance.

You are asked to walk through two applied machine-learning design cases. For each, cover the modeling approach and the business and ethical trade-offs.

Case 1: Forecasting departure lateness

An airline wants, for every scheduled flight, a prediction of how many minutes late it will push back. The prediction must be made 2 hours before scheduled departure. Available data includes past flight operations, airport congestion, aircraft and route attributes, weather forecasts, and crew and maintenance indicators.

Assume lateness is right-skewed, severe delays are rare but expensive, and each hub runs under different operating policies.

Propose a regression-based solution and discuss:

  • How you define the target and prevent label leakage.
  • Which features you would build.
  • How you split data over time for training and validation.
  • Which metrics you would use (for example MAE, RMSE, quantile loss) and why.
  • How you treat missing values, outliers, and strongly correlated inputs.
  • Whether multicollinearity hurts prediction, interpretability, or both.
  • What correlation level you would call "high" and why.
  • Alternatives to dropping correlated features (regularization, feature clustering, PCA, tree models).
  • How you would estimate the business impact of removing a feature.
  • How you would turn predictions into concrete operational actions.

Case 2: Screening entrants against a watchlist

A bank wants to analyze branch camera feeds and flag when someone entering matches a watchlist of known robbers. Describe the model and the decision system around it, including:

  • Closed-set versus open-set recognition.
  • Data collection and labeling.
  • Very low base rates and class imbalance.
  • Relative costs of false positives and false negatives.
  • Threshold choice, calibration, and human review.
  • Fairness, privacy, consent, and legal exposure.
  • Latency, and edge versus server inference.
  • Monitoring for drift, spoofing, and adversarial attacks.

Hints

Hint 1

For the lateness model, write down exactly what is known at T-2h. Every feature must be an as-of snapshot, so use forecasts rather than observations and estimated rather than actual inbound arrival times.

Hint 2

Because severe delays are rare and costly, think beyond a single point estimate: predicting the median plus a high quantile (such as P90) maps naturally onto buffers and proactive actions.

Hint 3

For the watchlist case, ask what fraction of people entering are truly on the list. That base rate dominates precision, so reason with it before choosing a threshold, and keep a human in the loop before any consequential action.