Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About Fractal Analytics hiring for Machine Learning roles
Fractal Analytics is an AI and analytics company working with large global enterprises in consumer goods, retail, healthcare and financial services. It provides data science, data engineering and AI products. In India it hires for data analysts, data scientists, data engineers, ML engineers and analytics consultants.
For Machine Learning roles, this Fractal Analytics practice set focuses most on Decision Trees and Ensembles (7), ML Fundamentals (6), Regression Models (4), Data Preprocessing and Feature Engineering (3). It has 4 easy, 22 medium, 4 hard questions, so you can start easy and work up to the harder ones.
Company type
Analytics
Headquarters
Mumbai, India
Main India offices
Mumbai, Bengaluru, Gurugram, Pune
Fractal Analytics Machine Learning interview process
Online assessment (aptitude + SQL + Python or statistics)
Technical round 1
Technical round 2 or case round
Hiring manager round
HR round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for Fractal AnalyticsStart 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
Your dataset has a city column with 2,000 unique values. How will you encode it?
One-hot would create 2,000 sparse columns, so I would first group rare cities below a frequency threshold into 'Other'. Then options are frequency encoding, out-of-fold target encoding, or mapping cities to useful attributes such as tier, state or population. For boosting models like CatBoost or LightGBM, native categorical handling also works well. I would compare options with cross-validation.
02
Compute permutation importance on validation data.
from sklearn.inspection import permutation_importance
import pandas as pd
r = permutation_importance(model, X_val, y_val, n_repeats=10,
scoring='roc_auc', random_state=42, n_jobs=-1)
imp = pd.Series(r.importances_mean, index=X_val.columns)
print(imp.sort_values(ascending=False))
Near-zero or negative values mean the feature adds little on unseen data.
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.
04
Random forest and LightGBM give the same AUC. Which would you deploy?
I would compare beyond AUC: model size, inference latency, training time, calibration and stability across time periods. LightGBM is usually smaller and faster to score, while random forest needs less tuning and is less prone to overfitting. If both are equal, I would choose the one that is cheaper to run and easier for the team to maintain and retrain.
05
What fairness checks would you run on a model that affects people?
Compare metrics across groups such as gender, age band or region: approval rate (demographic parity), true positive rate (equal opportunity) and false positive rate. Check calibration per group too. Remove or audit proxy features like pin code that may stand in for protected attributes. Document findings in a model card, and involve legal or compliance teams, especially for lending and hiring use cases.
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.
Stacking trains several diverse base models and then a meta-model on their out-of-fold predictions to combine them. It often gives a small accuracy gain, common in competitions. In production it adds complexity, latency and maintenance, so it is worth it only when the gain has clear business value. scikit-learn provides StackingClassifier and StackingRegressor.
08
What is the difference between Gini impurity and entropy?
Gini impurity is 1 - sum of p squared and measures the chance of misclassifying a random sample. Entropy is - sum of p log p and comes from information theory; the reduction is called information gain. Both usually produce very similar trees. Gini is slightly faster because it avoids logarithms, which is why it is the scikit-learn default.
Start with the right metrics, such as PR-AUC, recall at fixed precision or F1, not accuracy. Then use class_weight='balanced', resampling like random undersampling or SMOTE applied only on training folds, and threshold tuning based on business cost. Boosting models with scale_pos_weight also help. Stratified splits keep class ratios consistent across folds.
10
You are asked to predict customer churn. How would you frame the ML problem from scratch?
First define churn precisely, for example no purchase in 60 days, and the prediction window. It becomes binary classification. Build features from data available before the cut-off date only, choose a time-based split, and pick metrics like recall at a fixed precision or lift in the top decile. Start with logistic regression as a baseline, then try boosting, and agree on how retention teams will use the scores.
11
Marketing wants customer segments for campaigns. How do you approach it?
I would agree on the purpose first, such as retention or upsell. Then build RFM features (recency, frequency, monetary) plus category preferences, log-transform skewed values and scale them. I would try k-means for k between 3 and 8, use silhouette and business review to pick k, profile each segment and give them clear names. Finally, test segment-based campaigns against a control group.
12
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.
13
Tell me about a time your model did not work as expected. What did you do?
Situation: my first churn model scored 0.95 AUC in validation but failed in a pilot. Task: find out why. Action: I traced features and found one field updated after customers left, which leaked the label. I removed it, rebuilt features with a strict cut-off date and moved to a time-based split. Result: AUC dropped to 0.78 but held steady in production, and I added a leakage checklist to my workflow.
Bias is error from overly simple assumptions, which causes underfitting. Variance is error from sensitivity to the particular training sample, which causes overfitting. Increasing model complexity usually lowers bias but raises variance. The goal is the complexity that minimises total test error. For example, a linear model on curved data has high bias, while a very deep unpruned tree has high variance.
15
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.
16
Your house price model's residuals grow larger for expensive houses. What do you do?
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.
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.
20
When would you use AdaBoost and how does it re-weight samples?
AdaBoost trains weak learners, usually decision stumps, in sequence. After each round it increases the weights of misclassified samples so the next learner focuses on them, and gives each learner a vote weight based on its accuracy. It works well on clean data but is sensitive to noisy labels and outliers, which get ever larger weights. Gradient boosting is a generalisation that has largely replaced it.
21
Write a minimal scikit-learn workflow to train and evaluate a model.
The fit, predict, score pattern is the same for almost every estimator.
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import accuracy_score
model = LogisticRegression(max_iter=1000)
model.fit(X_train, y_train)
preds = model.predict(X_test)
print(accuracy_score(y_test, preds))
Use predict_proba when you need probabilities for thresholds or ranking.
22
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.
23
Your dataset has 800 correlated features and the model trains slowly. What would you do?
I would remove constant and near-duplicate features, drop one from each highly correlated pair, then apply PCA inside the pipeline and keep components explaining about 95 percent of variance. Alternatively, use L1-regularised models or tree importances for supervised selection. I would compare speed and cross-validated scores; often 50 to 100 features give nearly the same accuracy.
24
How do you work with data engineers and software engineers on an ML project?
I agree early on interfaces: which tables or APIs provide features, the input and output schema, latency targets and who owns monitoring. I share a short design document and keep my code in the same repository standards as theirs, with tests and reviews. In my last project weekly syncs with data engineering helped us fix a late-arriving data issue before launch rather than after.
25
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.
Regularisation adds a constraint or penalty that discourages overly complex models, such as large weights in linear models, deep trees or too many boosting rounds. It trades a little extra bias for a larger drop in variance, so test error falls. Examples include L1 and L2 penalties, dropout in neural networks, early stopping, pruning and limiting tree depth.
28
Your random forest model file is 2 GB and too slow for real-time scoring. What can you do?
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.
29
Explain gradient descent and the role of the learning rate.
Gradient descent minimises a loss by repeatedly moving parameters in the direction of the negative gradient: w = w - learning_rate * gradient. The learning rate controls step size. Too high and the loss oscillates or diverges; too low and training is very slow or gets stuck. Variants include batch, stochastic and mini-batch gradient descent, plus adaptive optimisers like Adam.
30
How do you tune the alpha of Ridge regression using cross-validation?
RidgeCV tests many alphas efficiently; scale features first.
from sklearn.linear_model import RidgeCV
from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import StandardScaler
import numpy as np
m = make_pipeline(StandardScaler(), RidgeCV(alphas=np.logspace(-3, 3, 30)))
m.fit(X_train, y_train)
print(m[-1].alpha_)
LassoCV and ElasticNetCV work the same way.
Tips to crack the Fractal Analytics Machine Learning interview
Revise statistics, machine learning basics and SQL, and be ready to explain model choice and evaluation metrics.
Practise analytics case questions for consumer goods or retail clients, such as forecasting or pricing.
Read about Fractal's AI products and its focus on decision intelligence for company-related questions.
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; Fractal Analytics interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the Fractal Analytics Machine Learning interview?
Candidates usually go through 5 stages: Online assessment (aptitude + SQL + Python or statistics); Technical round 1; Technical round 2 or case round; Hiring manager round; HR 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 Fractal Analytics Machine Learning interview?
This practice set leans on Decision Trees and Ensembles (7), ML Fundamentals (6), Regression Models (4), Data Preprocessing and Feature Engineering (3). Revise those first, then practise explaining one or two of your own projects end to end, because most Fractal Analytics interviewers ask you to walk through real work.
Are these the exact questions asked at Fractal Analytics?
No. These are curated practice questions that match the skills and difficulty usually tested in analytics interviews like Fractal Analytics's. They are not a leaked or verified list of past questions.
Where does Fractal Analytics hire Machine Learning professionals in India?
Fractal Analytics has large teams in Mumbai, Bengaluru, Gurugram, Pune. Openings and locations change often, so check the Fractal Analytics careers page and filter by city and experience.