Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About Myntra hiring for Machine Learning roles
Myntra is an Indian fashion and lifestyle e-commerce platform and part of the Flipkart group. Its technology and analytics teams work on search, personalisation, size recommendations, pricing, supply chain and marketing. It hires for software engineers, SDETs, business analysts, data analysts and data scientists. Fashion-specific data such as sizing matters a lot.
For Machine Learning roles, this Myntra practice set focuses most on MLOps and Deployment (5), Model Evaluation and Tuning (5), Regression Models (5), Decision Trees and Ensembles (4). It has 22 medium, 8 hard questions, so you can start easy and work up to the harder ones.
Company type
E-commerce & consumer tech
Headquarters
Bengaluru, India
Main India offices
Bengaluru
Myntra Machine Learning interview process
Online assessment (coding or SQL)
Technical or machine coding round
Problem solving or case round
Hiring manager round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for MyntraStart practicing
3 QUESTIONS FREESign up to unlock the full question bank and track your progress.Unlock every question and answer, then continue practising company-wise and package-wise.
✓ 3 questions free • Unlock the rest in seconds
01
A new model version performs badly right after release. How do you handle it?
Roll back immediately to the previous version from the model registry, which should be a one-step action. Then investigate: compare the input features served with those used in validation, check for training-serving skew, version mismatches or a wrong artifact. Add the failure case to automated pre-release checks, and use canary or shadow releases next time so issues affect only a small share of traffic.
02
How do you implement simple gradient descent for linear regression in NumPy?
Compute predictions, the gradient of MSE, and update weights in a loop.
import numpy as np
w = np.zeros(X.shape[1]); b = 0.0; lr = 0.01
for _ in range(1000):
err = X @ w + b - y
w -= lr * (2 / len(y)) * (X.T @ err)
b -= lr * (2 / len(y)) * err.sum()
Scale features first or the loop converges slowly.
03
Use HistGradientBoosting with native categorical support in scikit-learn.
from sklearn.ensemble import HistGradientBoostingClassifier
clf = HistGradientBoostingClassifier(
categorical_features='from_dtype', max_iter=500,
learning_rate=0.05, early_stopping=True, random_state=42)
X_train[cat_cols] = X_train[cat_cols].astype('category')
clf.fit(X_train, y_train)
It handles missing values natively and is much faster than GradientBoostingClassifier on large data.
04
An A/B test of a new recommendation model shows no significant uplift despite better offline metrics. What next?
I would check the test first: enough sample size and duration, correct randomisation, and no bugs in serving such as stale features. Then investigate whether offline metrics really reflect user value, for example optimising clicks rather than purchases, or popularity bias. Segment-level analysis may show gains in some groups. I would revise the offline metric to better match the online goal.
05
How do you choose a classification threshold that maximises F1?
from sklearn.metrics import precision_recall_curve
import numpy as np
proba = clf.predict_proba(X_val)[:, 1]
p, r, t = precision_recall_curve(y_val, proba)
f1 = 2 * p * r / (p + r + 1e-9)
best = t[np.argmax(f1[:-1])]
print(best)
Choose it on validation data, not the test set. scikit-learn 1.5+ also offers TunedThresholdClassifierCV.
06
A product team wants 'similar products' recommendations with no purchase labels. How would you start?
I would build product embeddings from content: TF-IDF or sentence embeddings of titles and descriptions, plus category and price features. Then use cosine similarity with nearest-neighbour search, such as scikit-learn NearestNeighbors or an approximate index like FAISS for large catalogues. I would review samples with the product team and later add co-view or co-purchase signals once collected.
Data leakage is when information not available at prediction time gets into training, giving falsely high validation scores. Example one: fitting a scaler or imputer on the full dataset before splitting. Example two: using a feature created after the event, such as 'refund issued' when predicting fraud. Prevent it with pipelines, time-aware splits and checking each feature's timestamp.
08
Your manager asks for a single number showing the model's business value. What do you give?
I would convert model outcomes into money or time using a cost matrix agreed with the business, for example savings from caught fraud minus the cost of reviewing false alerts. I would compare this against the current process or a rule-based baseline on holdout data and show a range rather than one point. A short note on assumptions keeps the number honest.
09
Your real-time model API takes 400 ms but the requirement is under 50 ms. What do you do?
Profile first to see whether time goes to feature lookup, preprocessing or the model. Then cache or precompute features, load the model once at startup, reduce trees or features, use a faster library like LightGBM or ONNX Runtime, and batch requests if possible. Run several workers and keep the service close to its data store. Re-measure p95 and p99 latency, not just the average.
10
Two models have RMSE 120 and 125, but the second has much lower MAE. Which do you choose?
It depends on error cost. The first model makes fewer big errors, while the second is better on typical cases but has some large misses. If large errors are expensive, such as stock-outs of costly items, choose the first. If typical accuracy matters more, choose the second. I would also check error distributions by segment and discuss with stakeholders before deciding.
11
Your model must run on a mobile app with no internet. What do you consider?
Model size, memory and latency on low-end phones become key. I would choose a compact model, reduce features, and convert it to a mobile format such as ONNX, TensorFlow Lite or Core ML, applying quantisation if needed. I would make sure all preprocessing is replicated on-device, test accuracy after conversion, and plan how model updates will ship with app releases.
Fix random seeds in NumPy, Python and the model, pin library versions in requirements.txt, version the data or record its hash, and save the exact code commit and hyperparameters. Tools like MLflow log parameters, metrics and artifacts per run. Use pipelines so preprocessing is identical each time, and keep the train-test split stored rather than recreated randomly.
13
k-means gives one huge cluster and several tiny ones. What could be wrong?
Likely causes are unscaled features, where one large-range feature dominates distance; heavy skew or outliers pulling centroids; or data that is not naturally spherical. I would log-transform and scale features, remove or cap extreme outliers, and try different k values. If shapes are irregular, DBSCAN, HDBSCAN or a Gaussian Mixture Model may fit better.
14
What is polynomial regression and what risk does it carry?
Polynomial regression adds powers and interaction terms of features, such as x squared and x1 times x2, so a linear model can fit curves. It is still linear in its coefficients. The main risk is overfitting at high degrees, plus wild behaviour outside the training range. Use cross-validation to choose the degree, scale features, and combine it with Ridge regularisation.
15
Build RFM features for customer segmentation in pandas.
Reduce size by limiting max_depth and min_samples_leaf, using fewer trees since gains flatten after a few hundred, and dropping weak features. Alternatively switch to a gradient boosting model like LightGBM, which usually gives similar accuracy with far smaller, faster models. Converting to ONNX or using a compiled predictor can also speed up inference. Measure accuracy and latency after each change.
That is heteroscedasticity, typical for price data that is right-skewed. I would model log(price) instead of price, which turns absolute errors into roughly percentage errors and stabilises variance. Then I would convert predictions back with exp and check residual plots again. Evaluating with RMSLE or MAPE also fits better when relative error matters more than absolute error.
19
Write a unit test for a model prediction function.
from sklearn.model_selection import LearningCurveDisplay
import numpy as np
LearningCurveDisplay.from_estimator(model, X, y, cv=5,
train_sizes=np.linspace(0.1, 1.0, 6), scoring='roc_auc', n_jobs=-1)
plt.show()
A persistent gap between curves suggests more data or regularisation; two low curves suggest a richer model or better features.
21
How do you build a text classifier with TF-IDF and logistic regression?
It states that no single algorithm is best for every problem when averaged over all possible problems. In practice it means you should try several model families, start with a simple baseline, and choose based on validation results for your data. For tabular data gradient boosting often wins, but a logistic regression may be preferred if interpretability matters more.
23
Explain a single prediction with SHAP for a tree model.
import shap
explainer = shap.TreeExplainer(model)
sv = explainer(X_val)
shap.plots.waterfall(sv[0])
shap.plots.beeswarm(sv)
The waterfall shows how each feature pushes one prediction up or down from the base value; the beeswarm shows global importance and direction. TreeExplainer is fast and exact for tree ensembles.
24
Your cross-validation score is 0.85 but the test score is 0.70. What could explain it?
Possible causes: leakage inside CV, such as preprocessing or feature selection fit outside folds; repeated tuning that overfit the CV folds; a test set from a different time period or population; or duplicate entities across folds but not test. I would check pipeline structure, switch to time-based or group splits that match how test data differs, and compare feature distributions between the two sets.
25
A demand forecast is consistently under-predicting during festivals. How would you fix it?
The model lacks festival information. I would add features for festival dates such as Diwali or regional holidays, days-to-festival, and past festival uplift for the same item. If the business cost of stock-outs is higher than over-stock, I would use a quantile loss for a higher percentile. Then validate specifically on past festival periods, not just the average error.
26
How would you encode cyclical features like hour of day or month?
Map the value onto a circle with sine and cosine so the end connects to the start.
import numpy as np
df['hour_sin'] = np.sin(2 * np.pi * df['hour'] / 24)
df['hour_cos'] = np.cos(2 * np.pi * df['hour'] / 24)
Now 23:00 and 00:00 are close, which linear and distance-based models cannot see with raw integers. Tree models often manage with the raw value.
27
New categories appear in production that were not in training data. How do you handle it?
Make the encoder tolerant: OneHotEncoder with handle_unknown='ignore' or infrequent_if_exist, or map unseen values to an 'Other' bucket. Monitor the share of unseen categories as a drift signal. If new categories become common, such as a new city launch, retrain with fresh data. Tests in the inference pipeline should include unseen values so the service never crashes.
28
Lasso dropped a feature the business considers very important. How do you handle it?
Lasso often keeps only one of a group of correlated features, so the dropped feature may be redundant rather than useless. I would check correlations, try Elastic Net which keeps correlated groups, and compare cross-validated performance with the feature forced in. I would explain the trade-off clearly; if the accuracy difference is small, keeping the feature for trust and interpretability is reasonable.
29
Grid search with 5 hyperparameters is taking two days. How do you speed it up?
Switch to random search or Optuna with pruning, which find good settings with far fewer trials. Narrow ranges using a quick coarse search, tune the most important parameters first, use early stopping for boosting, run trials in parallel with n_jobs, and tune on a stratified sample of the data before a final refit on the full set. HalvingRandomSearchCV is another quick option.
Gradient boosting starts with a simple prediction, like the mean, then repeatedly fits a small tree to the negative gradient of the loss, which for MSE is just the residuals. Each tree's output is scaled by a learning rate and added to the ensemble. A lower learning rate with more trees usually generalises better. Any differentiable loss can be used, which makes it flexible.
Tips to crack the Myntra Machine Learning interview
Prepare cases on fashion e-commerce issues like returns due to size, discount depth or End of Reason Sale planning.
Practise SQL and Python for analytics roles, including cohort and funnel analysis on order data.
Read about Myntra's use of data science in size recommendations and visual search.
Keep a one-minute story ready for every project on your CV: problem, your part, tools, result.
Practise the hard questions on this page aloud; Myntra interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the Myntra Machine Learning interview?
Candidates usually go through 4 stages: Online assessment (coding or SQL); Technical or machine coding round; Problem solving or case round; Hiring manager round. The exact rounds change with the role, team, location and your experience, so confirm the process with the recruiter.
Which topics should I prepare for the Myntra Machine Learning interview?
This practice set leans on MLOps and Deployment (5), Model Evaluation and Tuning (5), Regression Models (5), Decision Trees and Ensembles (4). Revise those first, then practise explaining one or two of your own projects end to end, because most Myntra interviewers ask you to walk through real work.
Are these the exact questions asked at Myntra?
No. These are curated practice questions that match the skills and difficulty usually tested in e-commerce & consumer tech interviews like Myntra's. They are not a leaked or verified list of past questions.
Where does Myntra hire Machine Learning professionals in India?
Myntra has large teams in Bengaluru. Openings and locations change often, so check the Myntra careers page and filter by city and experience.