Interview Questions, Part One
Explaining the classics.
In a machine learning interview, they rarely want a definition. They want to hear that you understand the trade-offs, and that you can explain things simply. Here's a good rule. Answer in three parts. Say what it is, say why it matters, then give an example. Let's practise on the classics.

- They want trade-offs, not definitions
- Explain things simply
- What, why, example
What is the bias-variance trade-off?
Here's a strong answer. Bias is error from a model that's too simple, and variance is error from a model that's too sensitive to its training data. Making a model more complex lowers bias, but raises variance, so we look for the balance. For example, a shallow tree underfits, and a very deep tree overfits. I check learning curves to see which problem I have, then either add complexity, or add data and regularisation.
How do you handle imbalanced data?
A strong answer has an order. First, I'd choose a metric that fits, such as precision recall, not accuracy. Then I'd ask what each kind of mistake costs. Next, I'd tune the threshold, which is often the biggest win. Then I'd try class weights, and only then resampling, always inside cross validation. Mentioning cost shows that you think about the business, and interviewers notice that.
Random forest or gradient boosting?
Compare them directly. A random forest builds independent trees, and averages them, which mainly reduces variance. It's robust, and needs little tuning. Boosting builds trees in sequence, each one fixing the last, which mainly reduces bias. It's usually more accurate, but needs more care, and it can overfit noisy data. I start with boosting on tables, and I use early stopping.
How would you explain overfitting to a manager?
Interviewers love this kind of question, as they want to hear you speak in plain language. Try this. Overfitting is like a student who memorises last year's exam paper. They get full marks on that paper, but they fail the real exam. Our model did well on old data, but it won't do well on new customers. That's why we hold back a test set. Keep it short, and use no jargon.
Summary
What, why, and an example. Mention trade-offs and costs. That formula works for nearly any question. Next, the harder design questions, where they ask you to think like a senior engineer.
Key takeaways- Answer with what, why, example
- Name the trade-offs
- Bring up the business