Machine learning interviews test more than definitions. Employers want to see that you can frame a problem, prepare data, pick and tune a model, choose the right metric and explain the result to someone outside the team. This guide gives you 77 machine learning interview questions and answers organised in the order those skills usually come up, from fundamentals to scenario questions.
Every answer starts with a short, direct response that you can say aloud in an interview, then adds detail, a comparison table or working code where that helps. The code uses scikit learn and was run before it was added to the page, so the printed output under each sample is the real result. Formulas are written out in words, so nothing depends on an image.
The guide has ten parts: 12 fundamentals questions, 9 on data preparation, 10 on supervised algorithms, 6 on unsupervised learning, 9 on evaluation and metrics, 6 on ensembles, 7 on deep learning, 7 on large language models, 5 on deployment and monitoring, and 6 scenario based questions. Use the contents list below to jump to your level.
| Section | Questions |
|---|---|
| Machine Learning Fundamentals | Q1 to Q12 |
| Data Preparation and Feature Engineering | Q13 to Q21 |
| Supervised Learning Algorithms | Q22 to Q31 |
| Unsupervised Learning | Q32 to Q37 |
| Model Evaluation and Metrics | Q38 to Q46 |
| Ensemble Methods | Q47 to Q52 |
| Deep Learning Basics | Q53 to Q59 |
| Large Language Models and Generative AI Basics | Q60 to Q66 |
| MLOps and Deployment | Q67 to Q71 |
| Scenario Based Machine Learning Interview Questions | Q72 to Q77 |
Every machine learning interview starts here. These questions check whether you understand how a model learns, how it fails and how you know it is working, before any algorithm is discussed.
Machine learning builds a model that learns patterns from data instead of following rules written by a programmer. In traditional programming you supply rules and data and get answers. In machine learning you supply data and known answers, and the algorithm finds the rules, which you then apply to new data.
Machine learning suits problems where the rules are too complex to write by hand, such as spam detection, demand forecasting or image recognition. It does not suit problems that have clear fixed rules, such as calculating tax.
The main types are supervised learning, which learns from labelled examples, unsupervised learning, which finds structure in unlabelled data, semi supervised learning, which mixes a few labels with many unlabelled records, and reinforcement learning, where an agent learns by receiving rewards for its actions.
| Type | Data needed | Typical task | Example |
|---|---|---|---|
| Supervised | Inputs with known labels | Classification, regression | Predict whether a customer will leave |
| Unsupervised | Inputs only | Clustering, anomaly detection, dimensionality reduction | Group customers by behaviour |
| Semi supervised | A few labels and many unlabelled records | Classification when labelling is costly | Tag documents with a small labelled set |
| Reinforcement | An environment that returns rewards | Sequential decisions | Game playing, robot control |
Classification predicts a category, such as spam or not spam, and regression predicts a continuous number, such as a house price. The choice decides the algorithms and the metrics you use. Logistic regression, despite its name, is a classification method because it predicts the probability of a class.
Some problems can be framed either way. Predicting a customer age band is classification, while predicting the exact age is regression.
The training set teaches the model, the validation set is used to compare models and tune settings, and the test set is used once at the end to estimate how the final model will perform on unseen data. If you tune on the test set, it stops being an honest measure of real performance.
The stratify argument keeps the share of each class the same in every split, which matters when one class is rare.
Overfitting happens when a model learns the training data too closely, including its noise, and performs worse on new data. You detect it when training performance is much better than validation performance. You reduce it with more data, a simpler model, regularisation, early stopping, dropout for neural networks, or cross validation.
Training accuracy climbs to 1.00 as the tree gets deeper, but test accuracy stops improving, so the gap between them keeps widening. That widening gap is the sign of overfitting.
Underfitting happens when a model is too simple to capture the pattern in the data, so it performs poorly on both the training set and the test set. You fix it by using a more flexible model, adding useful features, reducing regularisation, or training for longer.
A quick check: if training error is already high, the model is underfitting, and more data alone will not help. If training error is low but validation error is high, the model is overfitting.
Bias is the error from a model being too simple, and variance is the error from a model being too sensitive to the training sample. Total expected error equals bias squared plus variance plus irreducible noise. Making a model more complex lowers bias but raises variance, so you look for the point where the sum is lowest.
| Problem | Bias | Variance | Training error | Validation error | Typical fix |
|---|---|---|---|---|---|
| Underfitting | High | Low | High | High | More flexible model, better features |
| Good fit | Moderate | Moderate | Low | Close to training error | Keep and monitor |
| Overfitting | Low | High | Very low | Much higher | Regularise, simplify, add data |
Cross validation splits the training data into several folds, trains on all but one fold, tests on the held out fold, and repeats until every fold has been the test fold. The average score is a more stable estimate of performance than a single split, especially on small datasets.
Parameters are values the model learns from data during training, such as the coefficients in linear regression. Hyperparameters are settings you choose before training, such as tree depth, learning rate or the number of neighbours. You tune hyperparameters with a validation set or cross validation.
Besides grid search, random search and Bayesian optimisation are common. Random search often finds a good setting faster when there are many hyperparameters.
Data leakage happens when information from outside the training data, often from the test set or the future, influences the model, which makes the evaluation look better than real performance. Common causes are scaling or imputing before splitting, features built from the target, and random splits on time ordered data.
Putting preprocessing inside a pipeline is the simplest protection, because every step is fitted only on the training part of each fold.
As the number of features grows, the data becomes sparse, because the space to cover grows much faster than the number of rows. Distances between points become less meaningful, models need more data to generalise, and overfitting becomes more likely. Feature selection and dimensionality reduction are the usual remedies.
A loss function measures how wrong the model predictions are, for example mean squared error for regression or log loss for classification. Gradient descent adjusts the parameters in small steps in the direction that reduces the loss, and the learning rate controls the step size.
The printed values land close to the true slope of 3 and intercept of 5 used to create the data.
Most of the work in a real project is data preparation, so interviewers spend a good share of the time here. Expect questions about missing values, imbalance, scaling and pipelines.
First find out why the values are missing. Then choose between dropping rows or columns, filling with the mean, median or most frequent value, filling with a model based estimate, or flagging the missingness as a feature. Always learn the fill values from the training data only, and apply them to the test data.
The extra columns mark which values were missing, which can help when missingness itself carries information, for example a customer who skipped an income field.
Start by choosing metrics that suit the problem, such as precision, recall and the precision recall curve, instead of accuracy. Then use class weights, resample the training data with undersampling or oversampling, or generate synthetic samples with SMOTE. Always resample only the training folds, never the validation or test data.
Normalisation, or min max scaling, rescales values to a fixed range, usually 0 to 1. Standardisation subtracts the mean and divides by the standard deviation, so values have mean 0 and standard deviation 1. Distance based and gradient based models need scaled inputs, while tree based models do not.
Use one hot encoding for categories with no order, ordinal encoding when the categories have a real order such as low, medium and high, and target or frequency encoding for features with very many categories. Set handle_unknown so the model does not fail on a category it never saw during training.
The unseen city Chennai becomes a row of zeros instead of raising an error.
Detect them with the interquartile range rule, z scores, box plots or a model such as Isolation Forest. Then decide whether each one is an error, which you correct or remove, or a rare but valid value, which you keep. Capping values or using robust models and metrics is often safer than deleting rows.
Filter methods score each feature on its own, for example with correlation or mutual information. Wrapper methods train models on feature subsets and keep the best subset, as recursive feature elimination does. Embedded methods select features during training, as Lasso regression and tree based importance do.
Principal component analysis turns correlated features into a smaller set of uncorrelated components that keep as much variance as possible. Use it to reduce dimensions, remove multicollinearity, speed up training or visualise data. Scale the features first, and remember that components are harder to explain than original features.
Feature engineering is creating inputs that make the pattern easier for the model to learn, using domain knowledge. Examples include ratios such as spend per visit, date parts such as day of week, rolling averages, counts of past events, text length, and interaction terms between two features.
A pipeline chains preprocessing and the model into one object, so the same steps run in the same order during training and prediction. It prevents data leakage, makes cross validation honest, and lets you save and deploy the whole workflow as a single file.
These questions test whether you know how the common algorithms work, what they assume and when each one is a good choice. Explain the idea in plain words first, and add the maths only if asked.
Linear regression assumes a linear relationship between the features and the target, independent errors, constant error variance, errors that are roughly normally distributed, and no strong multicollinearity among the features. You check them with residual plots, a Q Q plot, the Durbin Watson test and variance inflation factors.
Normal errors matter mainly for confidence intervals and tests. The coefficients can still be estimated without it, so say that if you are asked which assumption is least critical.
Logistic regression computes a weighted sum of the features and passes it through the sigmoid function, which squeezes the result between 0 and 1 so it can be read as the probability of the positive class. The name comes from the regression step before the sigmoid. The final prediction is a class, chosen with a threshold.
Both add a penalty on large coefficients to reduce overfitting. L1, used in Lasso, adds the sum of absolute coefficients and can shrink some coefficients exactly to zero, so it also selects features. L2, used in Ridge, adds the sum of squared coefficients and shrinks all of them without removing any.
Elastic Net combines both penalties and is useful when features are correlated.
At each node the tree tries possible splits and picks the one that makes the child nodes purest. For classification, purity is measured with Gini impurity, which is 1 minus the sum of squared class proportions, or with entropy, which is the negative sum of each proportion times its base 2 logarithm. Regression trees use variance reduction.
A pure node, where every record belongs to one class, has a Gini impurity of 0. A node with an even split between two classes has a Gini impurity of 0.5.
A support vector machine finds the boundary that separates the classes with the widest possible margin, and only the points closest to the boundary, called support vectors, decide where it sits. The kernel trick lets it separate data that is not linearly separable by working as if the data were mapped to a higher dimension, without computing that mapping.
Choose k with cross validation. A small k follows the noise and overfits, while a large k smooths too much and underfits. Because kNN classifies by distance, a feature with a large range dominates the result, so scale the features first.
It applies Bayes theorem and assumes that all features are independent of each other given the class, which is rarely true. Despite this, it trains very fast, needs little data and works well for text classification such as spam filtering, where the features are word counts.
Multicollinearity means two or more features are strongly correlated, which makes coefficient estimates unstable and hard to interpret. Detect it with a correlation matrix or the variance inflation factor, where a value above about 5 to 10 is a warning. Fix it by dropping or combining features, using PCA, or using Ridge regression.
The variance inflation factor of a feature is 1 divided by (1 minus R squared), where R squared comes from regressing that feature on all the others.
A discriminative model learns the boundary between classes by modelling the probability of the label given the features. A generative model learns how the data of each class is produced, by modelling the features and the label together, so it can also create new samples. Logistic regression is discriminative, and Naive Bayes is generative.
ARIMA models a time series using its own past values (autoregressive order p), differencing to remove trend (d), and past forecast errors (moving average order q). SARIMA adds the same three ideas at the seasonal level, with seasonal orders P, D and Q and a season length m, so it can model repeating patterns such as monthly sales peaks.
Check that the series is stationary after differencing, and validate with a time based split, not a random one.
Unsupervised questions test how you find structure when there are no labels, and how you judge a result that has no single right answer.
K means picks k starting centres, assigns every point to its nearest centre, moves each centre to the mean of its points, and repeats until the assignments stop changing. Choose k with the elbow method, which looks for the point where adding clusters stops reducing the error much, or with the silhouette score, and then check that the clusters make business sense.
K means is fast and works for round clusters of similar size but needs k in advance. Hierarchical clustering builds a tree of clusters that you can cut at any level, but it is slow on large data. DBSCAN finds clusters of any shape from dense regions and marks sparse points as noise, with no need to set k.
| Method | Needs k | Cluster shape | Handles noise | Scales to large data |
|---|---|---|---|---|
| K means | Yes | Round, similar size | No | Yes |
| Hierarchical | No, you cut the tree | Flexible | Limited | No |
| DBSCAN | No, but needs a radius and minimum points | Any shape | Yes, marks noise | Moderately |
K nearest neighbours is a supervised method that predicts the label of a new point from the labels of its k closest training points. K means is an unsupervised method that groups unlabelled points into k clusters. They share the letter k and the use of distance, and nothing else.
PCA is a linear method that keeps the directions of greatest variance and can transform new data. The t SNE method is nonlinear and keeps local neighbourhoods, which makes it good for visualising clusters in two dimensions, but it cannot transform new data, and distances between clusters in its plots should not be over interpreted.
Use statistical rules such as z scores or the interquartile range for simple cases, and models such as Isolation Forest, local outlier factor or autoencoders for complex data. Isolation Forest isolates points with random splits, and anomalies need fewer splits to separate. Validate flagged cases with domain experts, because labels are usually missing.
Rows 200 and 201 are the two planted odd points. The extra flagged row is a normal point near the edge, which shows that detectors also raise some false alarms.
Collaborative filtering recommends items liked by users with similar behaviour, and content based filtering recommends items similar to ones the user already liked. Most production systems combine both, and add ranking models that use context such as time and device. The cold start problem, where a new user or item has no history, needs special handling.
Choosing the right metric is where many candidates lose marks. Always tie the metric to the cost of each kind of mistake in the business problem.
A confusion matrix counts true positives, false positives, true negatives and false negatives. Precision is true positives divided by all predicted positives, recall is true positives divided by all actual positives, and F1 is the harmonic mean of the two. Precision answers how many alerts were right, and recall answers how many real cases were found.
| Metric | Formula in words | Use it when |
|---|---|---|
| Accuracy | Correct predictions divided by all predictions | Classes are balanced and errors cost the same |
| Precision | True positives divided by predicted positives | False alarms are costly, for example blocking a genuine payment |
| Recall | True positives divided by actual positives | Missing a case is costly, for example fraud or disease screening |
| F1 score | Harmonic mean of precision and recall | You need one number that balances both on imbalanced data |
| ROC AUC | Area under the true positive rate versus false positive rate curve | You want to compare ranking quality across thresholds |
| PR AUC | Area under the precision versus recall curve | The positive class is rare |
On imbalanced data a model can score high accuracy by always predicting the majority class. If 98 percent of transactions are genuine, a model that never flags fraud is 98 percent accurate and completely useless. Use precision, recall, F1 and the precision recall curve instead.
The ROC curve plots the true positive rate against the false positive rate as the classification threshold changes. AUC is a single number, the area under that curve. An AUC of 0.5 means the model ranks no better than chance and 1.0 means a perfect ranking.
Use the precision recall curve when the positive class is rare. ROC AUC can look good because the large number of true negatives keeps the false positive rate low, even when many of the flagged cases are wrong. The precision recall curve focuses on the positive class and shows that weakness directly.
Mean absolute error is the average size of the errors and is easy to explain. Mean squared error penalises large errors more, and root mean squared error returns it to the original unit. R squared shows the share of variance explained. Choose MAE when outliers should not dominate and RMSE when large misses are especially costly.
The default threshold of 0.5 is rarely the best. Choose the threshold from the cost of each error: lower it to catch more positives at the cost of more false alarms, raise it to be more selective. Plot precision and recall against the threshold, or compute the expected business cost at each threshold, and pick the best point on validation data.
A model is calibrated when its predicted probabilities match real frequencies, so cases scored 0.8 are positive about 80 percent of the time. It matters when you use the probability itself, for example to price risk or to rank by expected loss. Check it with a calibration curve and fix it with Platt scaling or isotonic regression.
Never shuffle a time series. Use a forward chaining split, where each fold trains on earlier periods and tests on the period right after, so the model never sees the future. Scikit learn provides TimeSeriesSplit for this. A random split would leak future information into training.
Compare them on the same cross validation folds and look at the spread of the scores, not only the average. If the difference is smaller than the fold to fold variation, treat the models as equal and prefer the simpler or cheaper one. For important decisions, confirm with a held out test set or an online A B test.
Ensembles power most winning tabular data solutions. Interviewers want to see that you can explain why combining models works and when each method fits.
Bagging trains many models in parallel on random samples of the data and averages them, which mainly reduces variance. Boosting trains models one after another, where each new model focuses on the mistakes of the previous ones, which mainly reduces bias. Random forest is a bagging method, and gradient boosting is a boosting method.
| Point | Bagging | Boosting |
|---|---|---|
| Training | Models trained in parallel | Models trained in sequence |
| Main effect | Reduces variance | Reduces bias |
| Overfitting risk | Lower | Higher, needs tuning and early stopping |
| Examples | Random forest, bagged trees | AdaBoost, gradient boosting, XGBoost, LightGBM |
A random forest builds many decision trees, each on a bootstrap sample of the rows and with a random subset of features considered at every split. The trees are deliberately different from each other, and averaging their votes cancels much of their individual noise. The result is more accurate and more stable than one tree.
Each tree is trained on a bootstrap sample that leaves out roughly one third of the rows. Those left out rows are out of bag for that tree, so they can be used to test it. Averaging these predictions gives a validation estimate without a separate validation set.
Gradient boosting builds shallow trees one at a time, each fitted to the errors left by the trees before it, using gradient descent on a loss function. XGBoost and LightGBM are fast, regularised implementations of it with support for missing values and large data. A random forest builds deep trees independently and averages them.
Early stopping picks the number of trees using a validation split, which protects boosting from overfitting.
Stacking trains several different base models and then trains a final model, called a meta learner, to combine their predictions. The base models should make different kinds of errors, for example a linear model, a forest and a kNN. Use out of fold predictions to train the meta learner, so it does not learn from leaked information.
Tree based importance is quick but biased toward features with many distinct values. Permutation importance measures how much the score drops when one feature is shuffled, and works for any model. SHAP values give each feature a contribution for every single prediction, which supports both global and individual explanations.
Shuffling the second feature hurts the score the most, while features near zero add almost nothing. Scores slightly below zero are just noise.
You do not need to be a deep learning specialist for most machine learning roles, but you are expected to explain how a neural network learns and what the common building blocks do.
A neural network is made of layers of units. Each unit computes a weighted sum of its inputs, adds a bias and passes the result through an activation function. Layers stacked together can learn complex patterns. Training adjusts the weights to reduce the loss, using backpropagation to find how each weight affects the error.
ReLU is the default for hidden layers because it is simple and avoids vanishing gradients in most cases. Sigmoid outputs a value between 0 and 1 and suits a binary output. Softmax turns a vector of scores into probabilities that add up to 1, for multiclass output. Tanh outputs between minus 1 and 1 and is used in some recurrent networks.
Backpropagation uses the chain rule to compute the gradient of the loss for every weight, working backward from the output. An optimiser then updates the weights. Stochastic gradient descent uses small batches and one learning rate. Adam also keeps running averages of the gradient, so it adapts the step size for each weight and often converges faster.
In deep networks the gradient is a product of many small numbers as it flows backward, so it can shrink toward zero and the early layers stop learning. It is common with sigmoid and tanh activations. Using ReLU, careful weight initialisation, batch normalisation and residual connections reduces the problem.
Dropout randomly switches off a share of units during training, which stops units from relying on each other and reduces overfitting. Batch normalisation rescales layer inputs, which stabilises and speeds up training. Early stopping halts training when validation loss stops improving, so the model does not start memorising the training data.
Convolutional networks use small filters that slide over data, which suits images. Recurrent networks process a sequence step by step and carry a memory, which suited text and time series before transformers. Transformers use attention to relate every position in a sequence to every other, process it in parallel, and are now the standard for language.
| Architecture | Best known for | Main strength | Main limit |
|---|---|---|---|
| CNN | Images and video | Learns local patterns with few parameters | Less suited to long range order in text |
| RNN, LSTM, GRU | Sequences and time series | Keeps a running memory | Slow to train, struggles with long sequences |
| Transformer | Language, increasingly images and audio | Parallel training, long range context | Memory and compute grow quickly with input length |
Transfer learning starts from a model already trained on a large dataset and adapts it to your task, either by training only a new final layer or by fine tuning more of the network. Use it when you have limited labelled data, because the pretrained model already knows general features such as edges in images or grammar in text.
Most machine learning interviews now include a few questions on language models. Interviewers look for a clear mental model and for practical judgement, not for memorised product names.
A transformer is a neural network built around attention. For each token in the input, attention scores how relevant every other token is, then forms a weighted mix of their information. The scores come from the softmax of the query vectors multiplied by the key vectors, divided by the square root of the key dimension, and that result weights the value vectors.
Each row of the weight matrix adds up to 1. It shows how much one token attends to every token in the sequence.
A token is a piece of text, often part of a word, that a language model reads and produces. The context window is the maximum number of tokens the model can take in at once, including the prompt, any retrieved documents and the reply. Longer inputs cost more and can reduce accuracy on details in the middle.
An embedding is a list of numbers that represents the meaning of a word, sentence or image, so that similar items sit close together. Cosine similarity, which compares the angle between two vectors, is the usual way to measure closeness. Embeddings power semantic search, clustering and retrieval for language model applications.
Retrieval augmented generation, or RAG, first searches your own documents for passages that match the question, then gives those passages to the language model along with the question so it answers from them. It lets the model use current or private information without retraining, and it makes answers easier to check against a source.
This toy version uses word weights to retrieve. Production systems usually retrieve with embeddings, split documents into chunks, and often rerank the results.
Start with prompting, because it is cheapest and fastest to try. Add RAG when the model needs facts it was not trained on, such as your policies or recent data. Use fine tuning when you need a consistent style, format or specialised behaviour that prompts and retrieval cannot deliver, and you have good examples.
| Approach | Best for | Cost and effort | Main risk |
|---|---|---|---|
| Prompting | Quick tasks, formatting, simple behaviour | Lowest | Inconsistent on edge cases |
| RAG | Answers grounded in your documents and current data | Medium: indexing and retrieval pipeline | Poor retrieval leads to wrong answers |
| Fine tuning | Consistent style, domain behaviour, structured output | Highest: data, training and re evaluation | Needs good labelled examples and retraining as things change |
Hallucination is when a language model produces fluent text that is false or unsupported. Reduce it by grounding answers in retrieved sources, asking the model to cite them, allowing it to say it does not know, lowering randomness for factual tasks, validating structured output, and checking important claims with rules or a human reviewer.
Build a fixed set of realistic questions with reference answers or a scoring guide, and run it after every change to the prompt, model or retrieval. Score with exact checks where possible, human review for quality, and a second model as judge only with spot checks by people. Also track cost, speed and failure cases from real use.
A model that stays in a notebook creates no value. These questions check that you understand how models are shipped, watched and kept healthy.
Batch deployment runs the model on a schedule and stores predictions, which suits reports and nightly scoring. Real time deployment serves predictions through an API for each request, which suits fraud checks and recommendations. Edge deployment runs the model on a device. Choose by how fast the answer is needed and how often the inputs change.
Data drift means the distribution of the input features changes, for example customers become younger. Concept drift means the relationship between the inputs and the target changes, for example the same behaviour no longer predicts churn. Both reduce accuracy over time, so monitor inputs, predictions and, when labels arrive, real performance.
A very small p value from the Kolmogorov Smirnov test says the live data no longer looks like the training data. Many teams also track the population stability index.
Training serving skew means the features computed during training differ from those computed in production, for example because of different code, different time windows or missing values handled differently. The model then sees data it was never trained on. Share feature code between training and serving, or use a feature store, and test with the same sample in both places.
Record for every run the code version, data version, parameters, metrics and the saved model, so any result can be reproduced. Tools such as MLflow track experiments and a model registry, and DVC or similar tools version datasets. Without this, a team cannot explain why a model changed or roll back safely.
Retrain on a schedule, when monitoring shows drift or a drop in performance, or when enough new labelled data arrives. Test the new model against the current one on recent data, release it to a small share of traffic first, and keep the old version ready for rollback. Automate the steps so retraining is repeatable.
Scenario questions test judgement. There is rarely one right answer, so state your assumptions, ask what you need to know and walk through your reasoning in order.
Check the class balance first. If only 2 percent of cases are fraud, always predicting genuine also scores 98 percent. Then look at the confusion matrix, recall on fraud cases, precision of the alerts, the precision recall curve and the cost of a missed fraud against the cost of a false alarm, and tune the threshold to that cost.
What the interviewer is listening for: You do not accept a headline number and you connect metrics to business cost.
That points to overfitting, but first rule out leakage and a bad split. Then compare learning curves, simplify the model, add regularisation, remove noisy features, get more data, and use cross validation to tune settings. Re check the final model once on a clean test set.
What the interviewer is listening for: You check for leakage before blaming the model.
Suspect drift. Compare the live feature distributions with the training data, check for upstream changes such as a new data source or a changed field definition, and look at whether the target behaviour has changed. Confirm with recent labelled data, then retrain on newer data or fix the pipeline, and add monitoring so you see it sooner next time.
What the interviewer is listening for: You separate data problems, pipeline problems and real change in behaviour.
Ask what a retention offer costs and what a lost customer is worth. If missing a churner is far more costly than a wasted offer, favour recall and set a lower threshold. Estimate the expected profit at several thresholds on validation data, pick the best, and report precision at the number of customers the team can actually contact.
What the interviewer is listening for: You turn a vague goal into a metric that matches money and capacity.
The risk is overfitting. Remove clearly useless and duplicated features, use a regularised model such as Lasso or Ridge, or reduce dimensions with PCA, and rely on repeated cross validation with all preprocessing inside the folds. Be cautious about complex models, and say that more data would help more than any technique.
What the interviewer is listening for: You recognise the data size limit and pick simple, regularised approaches.
Describe the main factors in plain words using feature importance or SHAP, and show a few example cases. For fairness, compare error rates and approval rates across groups, check that features are not acting as proxies for protected traits, document the limits of the model, and keep a human review path for borderline decisions.
What the interviewer is listening for: You can communicate without jargon and you treat fairness as something to measure.
Prepare the fundamentals such as overfitting, the bias variance tradeoff and cross validation, then data preparation, the common supervised and unsupervised algorithms, evaluation metrics and ensembles. Add deep learning, language model basics and deployment for experienced roles. Be ready to work through a scenario question using your own reasoning.
You need working knowledge of probability, basic statistics, linear algebra and calculus ideas such as gradients. Most interviews ask you to explain concepts in words and apply them, not to derive proofs. Know what each formula means, for example why the loss falls when you step against the gradient.
Yes, most include Python coding. Expect a data manipulation task in pandas, a short modelling task in scikit learn, and sometimes a general coding problem. Practise building a full pipeline from raw data to a validated model, and explain your choices as you write the code.
For most data science and analytics roles, strong skills in classical machine learning are enough, and deep learning basics help. For roles in computer vision, language or research, deeper knowledge is expected. Read the job description, and be able to explain how a neural network learns and when you would use one.
Interviews for experienced candidates focus less on definitions and more on judgement. You are asked about problem framing, metric choice, data issues, deployment, monitoring and failures you have handled. Prepare two or three real projects and be ready to explain what went wrong and what you changed.
Use this plan if you have about a month before your interview. Adjust the pace to what you already know.
| Week | Focus | What to do |
|---|---|---|
| Week 1 | Fundamentals and data preparation | Run every code sample in the first two sections. Rewrite one pipeline from memory. |
| Week 2 | Supervised and unsupervised algorithms | For each algorithm, write a two line explanation and one case where you would not use it. |
| Week 3 | Evaluation, ensembles and scenario questions | Practise choosing a metric for five business cases, and justify each choice aloud. |
| Week 4 | Deep learning, language models, deployment and mock interviews | Build a small retrieval demo, review the deployment section and take a timed mock interview. |
If you want to practise these questions with a trainer and build projects you can talk about in interviews, you can book a free demo class for the Prwatech Data Science course. It covers Python, statistics and machine learning with hands on work.
Contact the learning team for current batch dates and fees.
Written by Mithun Ray, data engineering trainer at Prwatech. Reviewed by Avishekh Verma. Last updated October,2026.