Interview prep
25 machine learning interview questions, with answers.
The questions that come up again and again in ML engineer and data scientist interviews, answered the way an interviewer hopes to hear: clearly, briefly, and with the trade-off.
Interviewers rarely want a textbook definition. They want to know whether you understand when a method works, when it fails and what you'd do about it. Read each question, answer it out loud before opening the answer, then compare.
These 25 are a free sample. SchoolWhool's Foundations of AI course includes 650+ interview questions, each placed right after the lesson it tests, plus a mock interview with Gaurav.
Interview questions by topic
Going deeper on one tool or subject? Each page has 20 to 30 questions with answers.
28 scikit-learn interview questions, with answers
The scikit-learn questions interviewers actually ask: the estimator API, pipelines and leakage, cross-validation, tuning, and the practical traps that separate people who've used it from people who've read about it.
24 Jupyter interview questions, with answers
Jupyter Notebook and JupyterLab questions for data roles: kernels, hidden state, magics, environments, version control and when a notebook should become real code.
24 NumPy interview questions, with answers
NumPy interview questions on arrays, dtypes, views and copies, broadcasting, vectorisation and linear algebra: the foundations every data science library is built on.
26 pandas interview questions, with answers
pandas interview questions on indexing, cleaning, groupby, merges, reshaping and performance, including the warnings and silent bugs interviewers love to ask about.
23 data visualization interview questions, with answers
Data visualization interview questions with answers: choosing the right chart, honest design, matplotlib, seaborn and plotly, and the plots that matter when you build and evaluate models.
26 probability interview questions, with answers
Probability interview questions for data science and quant roles, with worked answers: conditional probability and Bayes, distributions, expectation, the classic puzzles, and where probability shows up in machine learning.
28 Python interview questions, with answers
Python interview questions for data science, ML and backend roles: mutability, data structures, functions and scope, classes, generators, errors and the GIL, with the pitfalls interviewers probe.
Fundamentals
What's the difference between supervised and unsupervised learning?
What is overfitting, and how do you detect it?
Explain the bias–variance trade-off.
What's the difference between a parameter and a hyperparameter?
Why do we need a separate test set if we already use cross-validation?
Evaluation and metrics
When is accuracy a bad metric?
Explain precision and recall to a non-technical manager.
What does an AUC of 0.5 mean? And 0.9?
How would you evaluate a model for a rare event, like fraud at 0.2%?
Which regression metric would you use: MAE or RMSE?
Models
How does linear regression find its weights?
Why is it called logistic regression if it does classification?
How does a random forest reduce overfitting compared with a single tree?
What's the difference between bagging and boosting?
How does k-nearest neighbours make a prediction, and what are its weaknesses?
Data and features
How do you handle missing values?
What is data leakage? Give two examples.
How would you encode a categorical feature with 10,000 values?
Do you always need to scale features?
How would you split time-series data for validation?
Production and judgement
Your model's offline metrics are great but it performs poorly in production. Why?
What would you monitor for a deployed model?
When should you not use machine learning?
What is model calibration and when does it matter?
Walk me through how you'd approach a new ML problem.
Preparing for a specific role?
Each careers guide has role-specific questions and what the interview rounds look like.
How to become a machine learning engineer
Builds, evaluates and ships models that run inside real products, and keeps them working after launch.
How to become a data scientist
Finds what the data says, and what it doesn't, then builds models and experiments that inform decisions.
How to become an AI engineer
Builds products on top of models, including large language models, and can tell when they're wrong.
From data analyst to machine learning
Already works with SQL and dashboards, and wants to build models rather than report on them.
First Principles, the SchoolWhool newsletter
One machine learning idea, explained properly, every week.
The intuition, the common mistake, and a five-minute way to try it yourself. Written by Gaurav.