Mid-level interview questionAsked at Capital One · interview write-up
In your gradient-boosted tree model, how are missing values handled, and how would you detect and control overfitting?
Model answer
XGBoost learns a default direction for missing values at every split: it tries sending them left and right and keeps whichever lowers the loss, so missingness itself can carry signal.
Detect overfitting by tracking training against validation loss over boosting rounds, on a time-based or grouped split. Control it with early stopping, shallower trees, larger min child weight, a lower learning rate, row and column subsampling, and L1 or L2 on leaf weights.
Practise the rest
35 Training questions, 492 in all, each with a model answer. Free.
More from Capital One interview questions.
More Training interview questions
- Implement masked cross-entropy in NumPy that stays numerically stable, with label smoothing and a temperature.
- Build a pipeline that finds math documents in web crawls and scores their quality.
- Explain KL divergence for language models: which direction is which, what happens when supports don't match, and how it's used as a regulariser.
- When would you use mean squared error versus cross-entropy? And what is LoRA?
- Explain Adam and its bias correction, and why AdamW decouples weight decay.
- Explain policy types in RL and modern policy-gradient methods such as TRPO, PPO and GAE, then compare linear attention and grouped-query attention.