HomebaseWorks

Machine learning basics interview questions

Machine learning basics questions interviewers commonly ask, with answers that show how you reason about models.

EWritten by the HomebaseWorks editorial team · reviewed 26 Oct 2026
1
How do you know if a model is overfitting?

I compare training and validation scores. If training accuracy is, say, 98% and validation is 75%, the model has learned noise specific to the training data. I then try regularisation, a simpler model, fewer features or more data, and check whether the gap closes.

2
Explain the bias-variance trade-off.

Bias is error from a model that is too simple to capture the pattern, and variance is error from a model that reacts too strongly to the particular training data. Making a model more flexible lowers bias but raises variance. The goal is the level of complexity where validation error is lowest.

3
When is accuracy a poor metric?

When classes are imbalanced. If only 2% of loans default, a model that predicts no default for everyone gets 98% accuracy and is useless. In that case I report precision, recall and F1 for the minority class, and pick which to optimise based on the cost of each mistake.

Advertisement
4
What is cross-validation and why use it?

It splits the data into k folds and trains k models, each validated on a different fold, then averages the scores. This uses all the data for both training and validation and gives a more reliable estimate than one split. It also shows how much performance varies, which tells me how stable the model is.

5
What is data leakage? Give an example.

Leakage is when information that would not be available at prediction time gets into training. A common example is scaling or imputing with statistics from the full dataset before splitting. Another is a feature like refund_issued when predicting whether an order will be returned, since it is only known afterwards.

6
How would you choose between precision and recall for a project?

I ask which mistake costs more. For screening patients for follow-up tests, a missed case is worse, so I favour recall. For an automatic account block, a false alarm upsets a genuine customer, so I favour precision and tune the threshold to keep false positives low.

Practise out loud. Say each answer once as written, then again in your own words with your own number or story.

Have a number ready. "My Machine learning basics score is at benchmark on a timed test" is a stronger answer than "I am good at it". Take the test and quote the result.

Advertisement
Continue with Machine learning basics4 lessons · 1 interview set · 1 test · 1 certificate
Not tested

More in Data and AI