All jobs / Data science / ML / AI

Machine Learning Fundamentals interview questions

Machine Learning Fundamentals questions a Data science / ML / AI can be asked, from first job to senior. Open one to see the strongest answer and why it works.

  1. What is the difference between supervised and unsupervised learning, and how do you tell which one a problem needs?

    The strongest answer: Supervised learns from examples with a known target and predicts it for new rows; unsupervised finds structure — clusters, low dimensions, anomalies — with no target; the question is whether a trustworthy label exists

    Why it works: Exactly — the presence of a target you trust is the deciding fact; if you want to predict a thing, you need examples of it.

    • Supervised: a known target exists.
    • Unsupervised: find structure, no target.
    • Ask: do I trust the labels?
    • Clusters are not predictions.
  2. You are asked to predict next week’s demand. What do you present first?

    The strongest answer: A dumb baseline — last week, seasonal last-year, or a simple average — then whether the model beats it on the same split

    Why it works: Exactly. If last-week wins, you learned that. Fancy without a baseline is theatre.

    • Always beat a named baseline.
    • Same split for both.
    • Simple can win.
    • Train loss is not the story.
  3. Train score is high, validation is much worse. What is the honest sentence?

    The strongest answer: The model memorised the train set — I simplify, regularise, or get more representative data; I do not keep stacking layers to “catch up”

    Why it works: Exactly. The gap is the story. Closing it by hiding val is fraud.

    • Train ≫ val usually means memorisation.
    • Simplify or get better data.
    • Do not advertise the train score.
    • Do not delete the evidence.
  4. Half the labels were guessed by an intern in an afternoon. The model is “done.” What do you do?

    The strongest answer: Stop treating the labels as truth — sample-check them, write a definition, and only then fit; a clean wrong label beats a clever net

    Why it works: Exactly. The model learns the intern’s afternoon. Definition and audit first.

    • Audit labels before architecture.
    • Write what a positive means.
    • Noise is not free regularisation.
    • “Always messy” is not a plan.
  5. Before a classifier, what baseline do you name out loud?

    The strongest answer: Predict the majority class — and any simple rule a human already uses — then show the model on the same slice

    Why it works: Exactly. Majority and the existing rule are the honest floors. Defaults of a strong model are not a floor.

    • Name majority and the current rule.
    • Compare on the same slice.
    • A default forest is not “the baseline.”
    • 50% is not magic.
  6. A gradient-boosted model loses to “if tenure < 30 days then high risk.” What do you do?

    The strongest answer: Ship or keep the rule until I can beat it on the slices that matter — I do not hide the rule to protect the model

    Why it works: Exactly. The rule is the incumbent. Beating it is the job. Hiding it is politics.

    • The simple rule is the incumbent.
    • Beat it on the slices that matter.
    • Do not hide the rule.
    • Do not drop the winning signal.
  7. Training and validation scores are both poor and almost identical. What is happening, and what do you try?

    The strongest answer: Underfitting — high bias: the model is too simple or the features too weak; add capacity or better features, train longer, reduce regularisation — more data alone will not help a model that cannot fit what it has

    Why it works: Right — no gap plus poor scores is bias, not variance; the fix is more expressiveness, not more restraint.

    • Both poor, no gap: underfitting.
    • High bias needs more capacity.
    • Better features, less regularisation.
    • More data fixes variance, not bias.
  8. You generate synthetic users to “balance” a rare class. What do you disclose?

    The strongest answer: That part of the train set is invented — I never evaluate on synthetic as if it were life, and I watch for copied stereotypes

    Why it works: Exactly. Synthetic can help training. It cannot be the exam, and it can amplify a cartoon of a group.

    • Disclose invented training rows.
    • Never exam on synthetic as if real.
    • Watch for stereotype copies.
    • Do not hide it as “preprocessing.”
  9. A colleague runs PCA before a classifier and keeps the components that explain 95% of the variance. What are they assuming, and when does it backfire?

    The strongest answer: That high variance means useful signal — PCA is unsupervised and can discard a low-variance direction that separates the classes; also unscaled features let one unit dominate, and the components lose their meaning

    Why it works: Exactly — variance is not relevance. Scale first, check what the dropped directions carried, and treat the cut as a tuned choice.

    • PCA keeps variance, not relevance.
    • Scale features first.
    • Check what the cut discards.
    • Fit on train only.
  10. Two annotators disagree on 40% of a sample. Next step?

    The strongest answer: Stop fitting — fix the definition, examples, and adjudication, then measure agreement again; a model will only learn the argument

    Why it works: Exactly. Disagreement is the dataset. Models do not settle definitions.

    • Fix the definition before the fit.
    • Adjudicate and re-measure agreement.
    • Do not average away a fight.
    • Do not ensemble two unclear labels.