Skip to content

Machine Learning Interview Questions in Indore

36 practice questions with answers for Machine Learning interviews in Indore.

Machine Learning jobs in Indore

Indore is one of central India's fastest-growing IT hubs, with IT-services campuses and product start-ups in its Super Corridor and IT parks. Companies here hire many freshers and value hands-on project work.

Below are 36 questions that match the mix of service, product and domain employers hiring machine learning engineers in Indore.

Solved for IndoreStart 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

Run k-means and plot the elbow and silhouette scores.

Save to ▾
Show answer
from sklearn.cluster import KMeans from sklearn.metrics import silhouette_score Xs = StandardScaler().fit_transform(X) for k in range(2, 10): km = KMeans(n_clusters=k, n_init=10, random_state=42).fit(Xs) print(k, round(km.inertia_), round(silhouette_score(Xs, km.labels_), 3)) Look for the bend in inertia and a high silhouette value.
02

Write a unit test for a model prediction function.

Save to ▾
Show answer
import joblib, pandas as pd def test_predict_shape_and_range(): model = joblib.load('model_v1.joblib') df = pd.DataFrame([{'age': 30, 'income': 50000.0, 'city': 'Pune'}, {'age': 45, 'income': 0.0, 'city': 'UnknownCity'}]) p = model.predict_proba(df)[:, 1] assert p.shape == (2,) assert ((p >= 0) & (p <= 1)).all() Run with pytest in CI so broken artifacts never reach production.
03

What is the difference between a regression and a classification problem?

Save to ▾
Show answer
Regression predicts a continuous number, such as sales next month or delivery time in minutes. Classification predicts a discrete category, such as fraud or not fraud, or one of five product types. The choice decides the loss function and metrics: regression uses MSE, MAE or R-squared, while classification uses log loss, accuracy, precision, recall or AUC.
04

How do you build a text classifier with TF-IDF and logistic regression?

Save to ▾
Show answer
from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.linear_model import LogisticRegression from sklearn.pipeline import make_pipeline clf = make_pipeline( TfidfVectorizer(ngram_range=(1, 2), min_df=2, sublinear_tf=True), LogisticRegression(max_iter=1000, class_weight='balanced') ) clf.fit(train_texts, train_labels) print(clf.score(test_texts, test_labels))
05

How do you evaluate clustering when there are no labels?

Save to ▾
Show answer
Use internal metrics: silhouette score, Davies-Bouldin index (lower is better) and Calinski-Harabasz index (higher is better). Check stability by re-clustering on bootstrap samples. Most important is external usefulness: profile each cluster with key statistics and check whether business teams find the segments distinct and actionable, for example different response to a campaign.
06

Explain hierarchical clustering and dendrograms.

Save to ▾
Show answer
Agglomerative hierarchical clustering starts with each point as its own cluster and repeatedly merges the two closest clusters. Linkage defines closeness: single, complete, average or Ward, which minimises variance. A dendrogram shows the merge history, and cutting it at a height gives the clusters. It does not need k upfront but scales poorly, roughly O(n squared) memory, so it suits smaller datasets.
07

What is the difference between parameters and hyperparameters?

Save to ▾
Show answer
Parameters are learned from data during training, such as the weights of a linear regression or split thresholds of a tree. Hyperparameters are set before training and control the learning process, such as learning rate, max_depth, number of trees or regularisation strength C. Hyperparameters are tuned with validation data using grid search, random search or Bayesian optimisation.
08

How do you explain the precision-recall trade-off to a business manager?

Save to ▾
Show answer
I use their own example. For fraud: 'If we flag more transactions, we catch more fraud, which is recall, but more genuine customers get blocked, which hurts precision. Here is a table of what each threshold means per day: frauds caught, customers disturbed, reviews needed.' Then we choose the threshold together based on cost. Managers relate much better to counts than to percentages.
09

A business stakeholder asks you to use deep learning for a 5,000-row tabular dataset. How do you respond?

Save to ▾
Show answer
I would explain that for small tabular data, gradient-boosted trees or regularised linear models usually match or beat neural networks, train faster and are easier to explain. I would propose building a simple baseline, then a boosting model, and only test a neural network if there is a clear reason. I would show the comparison on cross-validated metrics so the decision is data-driven.
10

Calculate the Population Stability Index for a feature.

Save to ▾
Show answer
import numpy as np def psi(expected, actual, bins=10): cuts = np.quantile(expected, np.linspace(0, 1, bins + 1)) cuts[0], cuts[-1] = -np.inf, np.inf e = np.histogram(expected, cuts)[0] / len(expected) + 1e-6 a = np.histogram(actual, cuts)[0] / len(actual) + 1e-6 return float(np.sum((a - e) * np.log(a / e))) Rule of thumb: below 0.1 stable, 0.1 to 0.25 moderate, above 0.25 significant drift.
11

How do you select the top k features using mutual information in scikit-learn?

Save to ▾
Show answer
SelectKBest with mutual_info_classif captures non-linear relationships, unlike plain correlation. from sklearn.feature_selection import SelectKBest, mutual_info_classif sel = SelectKBest(score_func=mutual_info_classif, k=20) X_new = sel.fit_transform(X_train, y_train) print(X_train.columns[sel.get_support()]) Put the selector inside a pipeline so selection is redone in each CV fold.
12

Why do skewed features often need a log or power transform?

Save to ▾
Show answer
Heavily right-skewed features like income or transaction amount have long tails that can dominate linear models and distance metrics. A log1p, Box-Cox or Yeo-Johnson transform compresses large values and makes the distribution closer to normal, which often improves linear and distance-based models. Yeo-Johnson works with zero and negative values. Tree models usually do not need these transforms.
13

How do you detect and treat outliers?

Save to ▾
Show answer
Detect with box plots, the IQR rule (below Q1 - 1.5 IQR or above Q3 + 1.5 IQR), z-scores above 3, or models like Isolation Forest. Treatment depends on cause: fix data entry errors, cap values (winsorise), apply log transforms for skewed data, or use robust models and losses. Genuine extreme values, such as large fraud amounts, may be the most important signal and should not be removed blindly.
14

Tell me about a time you balanced model accuracy against a business constraint.

Save to ▾
Show answer
Situation: our lead-scoring model had the best AUC with a large ensemble, but the CRM needed scores within 50 ms. Task: meet latency without losing much quality. Action: I compared a smaller LightGBM model with fewer features and measured both AUC and latency. Result: we lost 0.01 AUC but met the 50 ms limit, and sales teams adopted it because scores appeared instantly.
15

How would you encode cyclical features like hour of day or month?

Save to ▾
Show answer
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.
16

What is the softmax function?

Save to ▾
Show answer
Softmax turns a vector of raw scores into probabilities that sum to one: p_i = exp(z_i) / sum of exp(z_j). It is used in multinomial logistic regression and the output layer of neural networks for multiclass problems. Larger scores get exponentially larger shares. In practice the maximum score is subtracted before exponentiation to avoid numerical overflow.
17

Tell me about a time you discovered your own mistake after sharing results.

Save to ▾
Show answer
Situation: after presenting a 12 percent uplift from a pricing model, I found my evaluation used a random split on time-series data. Task: correct it quickly. Action: I re-ran with a time-based split, which showed 7 percent, and informed my manager the same day with the corrected analysis. Result: the team appreciated the honesty, the rollout plan used the right number, and I added split checks to our review template.
18

What is k-fold cross-validation and why is it better than a single split?

Save to ▾
Show answer
k-fold cross-validation splits training data into k folds, trains on k-1 folds and validates on the remaining one, repeating k times so every row is validated once. Averaging the k scores gives a more stable estimate than one random split and shows variance across folds. Five or ten folds are common. Use StratifiedKFold for classification and GroupKFold when rows from one user must stay together.
19

Your team retrains models manually in notebooks every month. How would you improve it?

Save to ▾
Show answer
I would convert the notebook into a versioned training pipeline with separate steps for data extraction, validation, feature building, training and evaluation, scheduled with Airflow or a cloud pipeline. Each run would log to MLflow, compare against the production model on a fixed holdout, and register the new model only if it passes thresholds. Promotion would stay a reviewed step, at least initially.
20

Use statsmodels to get p-values for regression coefficients.

Save to ▾
Show answer
import statsmodels.api as sm Xc = sm.add_constant(X_train) ols = sm.OLS(y_train, Xc).fit() print(ols.summary()) The summary shows coefficients, standard errors, p-values, confidence intervals, R-squared and diagnostics. scikit-learn focuses on prediction and does not report p-values, so statsmodels is preferred for inference.
21

How does logistic regression work?

Save to ▾
Show answer
Logistic regression computes a weighted sum of features and passes it through the sigmoid function, 1 / (1 + e^-z), to get a probability between 0 and 1. It is trained by minimising log loss. Coefficients represent change in log-odds per unit of a feature, and exp(coefficient) gives the odds ratio. A threshold, 0.5 by default, converts probabilities into class labels.
22

What is DBSCAN and when is it better than k-means?

Save to ▾
Show answer
DBSCAN groups points that lie in dense regions, defined by eps (neighbourhood radius) and min_samples, and labels points in sparse areas as noise. It finds arbitrarily shaped clusters, does not need k, and handles outliers. It struggles when clusters have very different densities and in high dimensions. HDBSCAN improves on it for varying densities.
23

What is the difference between offline evaluation and online A/B testing of a model?

Save to ▾
Show answer
Offline evaluation measures metrics like AUC on historical holdout data; it is fast and cheap but cannot capture user behaviour changes or feedback loops. Online A/B testing exposes a share of real traffic to the new model and measures business outcomes like conversion or loss rate. Offline gains do not always translate online, so important models are validated with A/B tests or shadow deployments.
24

You need prediction intervals, not just point estimates, for delivery time. How?

Save to ▾
Show answer
Options are quantile regression, training separate models for the 10th and 90th percentiles with GradientBoostingRegressor(loss='quantile') or LightGBM; conformal prediction, which wraps any model and gives intervals with guaranteed coverage; or bootstrapping. I would check calibration: about 80 percent of actual values should fall within an 80 percent interval on a holdout set.
25

Lasso dropped a feature the business considers very important. How do you handle it?

Save to ▾
Show answer
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.
26

Use HistGradientBoosting with native categorical support in scikit-learn.

Save to ▾
Show answer
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.
27

How do you compare two models fairly?

Save to ▾
Show answer
Use the same data splits and folds, the same preprocessing inside pipelines and the same metric tied to the business goal. Look at the mean and standard deviation across folds, not one number, and use a paired test like a corrected t-test or bootstrap on the fold differences. Also compare cost factors: latency, memory, interpretability and maintenance.
28

40 percent of values in an important income column are missing. What do you do?

Save to ▾
Show answer
I would study the missingness pattern first, for example whether self-employed applicants skip it. I would add a binary was_missing feature, impute with the median within relevant groups or use IterativeImputer, and compare against models that handle missing values natively, like HistGradientBoosting or XGBoost. I would also raise the issue with the data owner so collection can improve.
29

How do you plot an ROC curve and get AUC in scikit-learn?

Save to ▾
Show answer
from sklearn.metrics import roc_auc_score, RocCurveDisplay import matplotlib.pyplot as plt proba = clf.predict_proba(X_test)[:, 1] print('AUC', roc_auc_score(y_test, proba)) RocCurveDisplay.from_predictions(y_test, proba) plt.show() Pass probabilities or decision scores, not hard labels, otherwise the curve has only one point.
30

Describe a time you found a serious data quality issue late in a project.

Save to ▾
Show answer
Situation: two days before a demo, I noticed sales for one region were doubled. Task: fix it without missing the deadline. Action: I traced it to a join that duplicated rows on a non-unique key, fixed the join, added row-count assertions to the pipeline and retrained. I informed my lead immediately with the impact. Result: the demo went ahead with correct numbers, and the assertions caught a similar issue later.
31

When would you use AdaBoost and how does it re-weight samples?

Save to ▾
Show answer
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.
32

What is the difference between batch, stochastic and mini-batch gradient descent?

Save to ▾
Show answer
Batch gradient descent uses the full dataset for each update, giving stable but slow and memory-heavy steps. Stochastic gradient descent updates after every single example, which is fast and noisy and can escape shallow minima. Mini-batch uses small groups such as 32 to 512 rows, balancing stability with speed and allowing vectorised computation. Mini-batch is the default in practice.
33

What is boosting and how is it different from bagging?

Save to ▾
Show answer
Boosting trains models sequentially, each one focusing on the errors of the combined previous models, which mainly reduces bias. Bagging trains models independently in parallel and averages them, which mainly reduces variance. Boosting uses shallow trees and a learning rate, and can overfit if run too long, so early stopping is important. Examples are AdaBoost, Gradient Boosting, XGBoost, LightGBM and CatBoost.
34

How do you create polynomial features with regularisation in a pipeline?

Save to ▾
Show answer
from sklearn.preprocessing import PolynomialFeatures, StandardScaler from sklearn.linear_model import Ridge from sklearn.pipeline import make_pipeline model = make_pipeline( PolynomialFeatures(degree=2, include_bias=False), StandardScaler(), Ridge(alpha=1.0) ) model.fit(X_train, y_train) Tune degree and alpha together with GridSearchCV to avoid overfitting.
35

What is the difference between Gini impurity and entropy?

Save to ▾
Show answer
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.
36

Run stratified 5-fold cross-validation with multiple metrics.

Save to ▾
Show answer
from sklearn.model_selection import StratifiedKFold, cross_validate cv = StratifiedKFold(n_splits=5, shuffle=True, random_state=42) res = cross_validate(pipe, X, y, cv=cv, scoring=['roc_auc', 'average_precision', 'f1'], n_jobs=-1) for k in ['test_roc_auc', 'test_average_precision', 'test_f1']: print(k, res[k].mean().round(3), res[k].std().round(3))

Few big employers listed in Indore?

Many Indore candidates also apply to teams in Pune and to remote or hybrid roles. Practise the Pune set as well.

Frequently asked questions

Which companies hire Machine Learning professionals in Indore?

Companies with large offices in Indore include many IT services and product firms. Use their company pages below to practise employer-specific sets.

Are Machine Learning interviews in Indore different from other cities?

The questions depend more on the company than the city. Indore's mix of employers decides the style: Companies here hire many freshers and value hands-on project work

How do I find Machine Learning jobs in Indore?

Shortlist companies with Indore offices, keep your CV focused on Machine Learning projects, apply on company career pages and job portals with the Indore filter, and practise the questions on this page before each interview.