Data Engineering & ML

Machine Learning interview questions

Interviewers probe whether you can reason about the bias-variance tradeoff, evaluate models honestly, prevent leakage and overfitting, and choose algorithms that fit the data and the business objective rather than reciting definitions. Expect a mix of concept checks, applied modeling judgment, and end-to-end pipeline design.

6 questions (1 easy · 3 medium · 2 hard), each with what a strong answer covers and where people lose the point. Free to read, no account.

On this page (6 questions)

1.What is the difference between supervised and unsupervised learning? Give an example of each.

Warm-up

What a strong answer covers

  • Supervised learning trains on labeled examples (X mapped to a known y) to predict a target: classification (spam or not) or regression (house price).
  • Unsupervised learning finds structure in unlabeled data: clustering (customer segments via k-means), dimensionality reduction (PCA), or density estimation.
  • Concrete examples on both sides, plus a note that semi-supervised and self-supervised sit between them when labels are scarce or costly.
  • A strong answer ties the choice to label availability and cost, not just definitions.

Where people lose the point

  • Calling clustering a supervised method or confusing it with classification.
  • Giving only definitions with no concrete example of each.
  • Not recognizing that reinforcement learning is a separate paradigm, not a subtype of the two.
Link to this question

2.Explain the bias-variance tradeoff and how it relates to overfitting and underfitting.

Core

What a strong answer covers

  • Bias is error from wrong assumptions (too simple a model, underfits); variance is sensitivity to the specific training sample (too complex, overfits).
  • Expected test error decomposes into bias squared plus variance plus irreducible noise; you cannot drive both to zero at once.
  • High bias shows as poor train and test performance; high variance shows as a large gap between strong train and weak test performance.
  • Levers: model complexity, regularization strength, and training-set size all shift where you sit on the curve.

Where people lose the point

  • Defining bias and variance backwards, or conflating variance with the statistical variance of a feature.
  • Claiming more data always fixes high bias (it mainly reduces variance).
  • Not connecting the tradeoff to observable symptoms like the train-test gap.
Link to this question

3.You built a fraud classifier that is 99% accurate, but stakeholders are unhappy. What is going on, and which metrics would you use instead?

Core

What a strong answer covers

  • With rare positives (say 1% fraud), a model that predicts 'never fraud' scores 99% accuracy while catching zero fraud, so accuracy is misleading under class imbalance.
  • Use precision (of flagged cases, how many are real fraud) and recall (of real fraud, how many were caught), summarized by F1 or by the area under the precision-recall curve.
  • The right operating point depends on the cost of a false negative (missed fraud) versus a false positive (blocking a good customer); tune the decision threshold accordingly.
  • Techniques to help: resampling or class weighting, and evaluating with a confusion matrix rather than a single number.

Where people lose the point

  • Defending raw accuracy or not spotting that the base rate makes it meaningless.
  • Confusing precision and recall, or treating them as interchangeable.
  • Recommending ROC-AUC as the fix without noting PR curves are more informative when positives are very rare.
Link to this question

4.What is regularization, and what is the practical difference between L1 and L2?

Core

What a strong answer covers

  • Regularization adds a penalty on model complexity (typically weight magnitude) to the loss, trading a bit of training fit for lower variance and better generalization.
  • L2 (ridge) penalizes squared weights, shrinking them smoothly toward zero but rarely exactly to zero; it handles correlated features gracefully.
  • L1 (lasso) penalizes absolute weights, which drives some coefficients exactly to zero and so performs feature selection, yielding sparse models.
  • Elastic net blends both; the strength hyperparameter (lambda or alpha) is tuned via cross-validation, and features should be scaled first.

Where people lose the point

  • Swapping which of L1 and L2 produces sparsity.
  • Forgetting that features must be standardized before penalizing weights.
  • Describing regularization as something that always improves training accuracy (it deliberately does not).
Link to this question

5.What is data leakage, how does it show up, and how do you prevent it?

Hard

What a strong answer covers

  • Leakage is when information unavailable at prediction time slips into training, producing validation scores that collapse in production.
  • Common forms: fitting a scaler, imputer, or target encoder on the full dataset before splitting; features that are proxies for the label; and time leakage where future rows inform past predictions.
  • Symptoms: suspiciously high offline metrics, a single feature dominating importance, or a large train-to-production performance drop.
  • Prevention: split first, fit all preprocessing inside a pipeline on the training fold only, use time-based splits for temporal data, and audit top features for future information.

Where people lose the point

  • Fitting preprocessing on all data and then splitting (the classic leak).
  • Using random k-fold on time-series data instead of a forward-chaining split.
  • Only defining leakage abstractly with no concrete example or detection signal.
Link to this question

6.For a tabular business problem, when would you choose gradient-boosted trees over a linear or deep model, and how would you validate the choice?

Hard

What a strong answer covers

  • Gradient-boosted trees (XGBoost, LightGBM) excel on heterogeneous tabular data: they capture nonlinearities and interactions, handle mixed feature scales, and are robust to outliers with little preprocessing.
  • Prefer linear or logistic models when interpretability, calibrated probabilities, or a strong linear signal matter, or when data is small and high-dimensional; prefer deep nets mainly for unstructured inputs like text, images, or audio.
  • Validate with cross-validation (time-based if temporal), a held-out test set, and comparison against a simple baseline; check calibration and per-segment performance, not just aggregate score.
  • Weigh operational factors: training and inference cost, latency, retraining cadence, and how easily each model can be explained to stakeholders and regulators.

Where people lose the point

  • Reaching for deep learning by default on modest tabular data where boosted trees usually win.
  • Comparing models without a baseline or a consistent, leakage-free validation setup.
  • Ignoring non-accuracy factors like latency, interpretability, and maintenance cost.
Link to this question
No account needed

Answer one real Machine Learning question now

A question a Machine Learning panel actually asks, answered out loud, scored on what you said and how you said it. Under two minutes, and nothing to sign up for.

What is the difference between supervised and unsupervised learning? Give an example of each.

We never store the audio. Your answer is deleted within 24 hours unless you save the result.

How Machine Learning answers get judged

The weights a Machine Learning interviewer is holding, whether or not they say so out loud. Round Zero scores your practice answers against exactly these, and quotes your own words back as the evidence for each.

Modeling judgment

40%

Chooses algorithms, features, and loss functions that fit the data shape, label quality, and business objective, and can justify the tradeoffs rather than defaulting to one favorite model.

Evaluation rigor

35%

Picks metrics appropriate to the problem and class balance, uses proper validation splits, and actively guards against leakage, overfitting, and metrics that flatter a useless model.

Communication

25%

States assumptions, structures the answer before diving in, and explains the intuition behind a method rather than only reciting its name.

Role tracks that include Machine Learning

Related Data Engineering & ML skills

All skills →

Now say them out loud

You have read what strong Machine Learning answers contain. The next thing that moves the needle is producing one under time, out loud, and finding out where it falls apart.

  • These questions asked back, with follow-ups
  • Flashcards for the ones you keep missing
  • A scored mock that quotes your own answers

Browse every skill

Practising Machine Learning: common questions

What Machine Learning interview questions should I practice?
Start with the core areas Machine Learning interviewers probe: What is the difference between supervised and unsupervised learning? Give an example of each.; Explain the bias-variance tradeoff and how it relates to overfitting and underfitting.; You built a fraud classifier that is 99% accurate, but stakeholders are unhappy. What is going on, and which metrics would you use instead. This page outlines strong answers and common mistakes, and the scored path drills each one with follow-ups.
Is the Machine Learning practice free?
Yes. The Machine Learning path runs free inside Round Zero: lessons, practice questions and flashcards. Drills are unlimited on every plan, free included. So is the full scorecard. Free also covers 3 complete scored interviews, no card.
How is this different from a Machine Learning question list?
A static list gives you questions with no feedback. Round Zero runs a live scored practice that probes your actual answers, rotates difficulty, and tells you exactly what to fix, grounded in a Machine Learning rubric.
How should I prepare for a Machine Learning interview?
Learn the concepts, drill the questions until answers come fast, then prove it in a scored mock. Round Zero sequences all three so you know you are ready, not just that you read about Machine Learning.
How is a Machine Learning answer scored?
Machine Learning answers are scored on modeling judgment, evaluation rigor, communication, with evidence quoted from what you actually said, so feedback is specific instead of generic praise.