Interview Prep9 min read

Top 20 Machine Learning Interview Questions with Answers (2026)

The conceptual round of a data science interview rewards intuition over math derivations. If you can explain when a model overfits, which metric to trust, and how to split your data honestly, you're most of the way there. Here are the recurring questions, answered.

A laptop showing a neural network diagram and a scatter plot, representing machine learning

Learning types & models

Supervised vs unsupervised vs reinforcement learning?

Supervised learning trains on labelled data to predict outputs (spam detection). Unsupervised learning finds structure in unlabelled data (clustering customers). Reinforcement learning learns from reward feedback through trial and error (game-playing agents).

Regression vs classification?

Regression predicts a continuous value (house price); classification predicts a discrete category (spam or not). The output type decides which algorithms and metrics you use.

Decision tree vs random forest?

A decision tree splits data on features to reduce impurity but overfits easily. A random forest trains many trees on random subsets and averages them, cutting variance and generalising better.

Fitting & generalisation

Overfitting vs underfitting - how do you spot each?

Overfitting memorises training noise: high training accuracy but poor validation/test scores (high variance). Underfitting is too simple to capture the pattern: poor scores everywhere (high bias). The train-versus-validation gap tells you which you have.

Explain the bias-variance trade-off.

Simple models have high bias (they miss patterns); complex models have high variance (they chase noise). Total error is minimised at the balance point, which is what model selection and regularisation aim for.

L1 vs L2 regularisation?

Both penalise large weights to curb overfitting. L1 (Lasso) can drive weights to exactly zero, doing feature selection; L2 (Ridge) shrinks weights smoothly without eliminating them.

Why split into train/validation/test, and what is cross-validation?

Separate sets prevent you from evaluating on data the model saw, which would leak and inflate scores. K-fold cross-validation rotates the validation fold to give a more reliable estimate when data is limited.

Evaluation

Accuracy vs precision vs recall vs F1?

Accuracy is the fraction correct, but it misleads on imbalanced data. Precision is how many predicted positives are truly positive; recall is how many actual positives you caught; F1 is their harmonic mean, balancing the two.

What is a confusion matrix and ROC-AUC?

A confusion matrix breaks predictions into true/false positives and negatives, from which precision and recall are computed. ROC-AUC measures how well the model ranks positives above negatives across all thresholds.

The bottom line

Now go test yourself

Machine learning interviews, at the conceptual level, reward clear intuition: knowing when a model overfits, which metric to trust on imbalanced data, and how to split data honestly matters more than deriving equations. Explain those in plain language and you'll handle most data science screening rounds.

The concepts stick when you're tested on them, not when you re-read them. Start a machine learning quiz, work through the overfitting and metrics questions, and pair it with Python and SQL practice for a complete data-role toolkit.

FAQs

Frequently asked questions

Do I need heavy math for a machine learning interview?

For the conceptual round, intuition matters most - when models overfit, which metric to use, how to split data. Deeper math comes up mainly for research roles.

Which ML topics are asked most often?

Overfitting and regularisation, the bias-variance trade-off, evaluation metrics, and the difference between model families like trees and linear models.

How do I prepare for data science interviews?

Pair ML concept MCQs with Python and SQL practice - most data roles test all three.

What is overfitting and how do you prevent it?

Overfitting is when a model memorises training noise and performs poorly on new data (high variance). You prevent it with more data, regularisation, simpler models, cross-validation, and early stopping.

What is the bias-variance trade-off?

Simple models have high bias (they miss patterns); complex models have high variance (they chase noise). Total error is minimised at the balance point between the two, which is what model selection and regularisation aim for.

What is the difference between supervised and unsupervised learning?

Supervised learning trains on labelled data to predict outputs (spam detection); unsupervised learning finds structure in unlabelled data (clustering). Reinforcement learning, a third type, learns from reward feedback.

Why is accuracy a poor metric for imbalanced data?

If 95% of samples are one class, a model that always predicts that class scores 95% accuracy while being useless. Precision, recall and F1 reveal how well the model actually finds the minority class.

What is the difference between precision and recall?

Precision is how many predicted positives are truly positive; recall is how many actual positives the model caught. There's usually a trade-off, and F1 (their harmonic mean) balances the two.

What is regularisation in machine learning?

Regularisation penalises large model weights to curb overfitting. L1 (Lasso) can drive weights to zero, effectively selecting features; L2 (Ridge) shrinks weights smoothly without eliminating them.

Related quizzes

Put it into practice

Keep reading

Related articles

Browse all articles →

Test yourself in two minutes

Six adaptive questions, every answer explained by an AI tutor. Free.

▶ Start an AI quiz