Coforge Data Science Interview Questions & Answers
Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About Coforge hiring for Data Science roles
Coforge, formerly NIIT Technologies, is an Indian IT services company focused on industries such as banking, insurance, and travel and transportation. It provides application development, testing, cloud, data and integration services. In India it hires for software engineers, test engineers, data analysts and data engineers.
For Data Science roles, this Coforge practice set focuses most on Machine Learning (7), Python for Data Science (5), MLOps and Model Deployment (4), Computer Vision (4). It has 17 easy, 22 medium, 1 hard questions, so you can start easy and work up to the harder ones.
Company type
IT services
Headquarters
Noida, India
Main India offices
Noida, Greater Noida, Bengaluru, Pune, Hyderabad
Coforge Data Science interview process
Online assessment (aptitude + reasoning)
Technical MCQs or coding test
Technical interview
HR round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for CoforgeStart 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
What is the difference between batch and real-time inference?
Batch inference scores many records on a schedule, for example nightly churn scores for all customers written to a table. It is cheap and simple. Real-time inference serves predictions on request through an API within milliseconds, for example fraud checks during payment. It needs low-latency feature access, scaling and high availability. Choose real-time only when the decision truly must use fresh data at the moment of the request.
02
What is the difference between a population and a sample?
A population is the full group you want to learn about, such as all customers of an app. A sample is the subset you actually observe, such as 5,000 surveyed customers. Numbers from the population are parameters, and numbers from a sample are statistics that estimate them. Good sampling, ideally random, lets you generalise from the sample to the population and measure the uncertainty using standard errors and confidence intervals.
The receptive field is the region of the input image that can influence one activation. Early layers see small patches like edges, and deeper layers see larger regions, enabling recognition of whole objects. It grows with kernel size, depth, stride and pooling, and dilated convolutions increase it without extra parameters. If the receptive field is smaller than the objects you care about, the network cannot capture their full context.
The model memorises noise and fails on new data. Prevent it with more data, simpler models, regularisation, cross-validation, early stopping and dropout.
05
You keep adding features and R-squared keeps rising. Is the model really getting better?
R-squared shows the share of variance in the target explained by the model. It never decreases when you add a feature, even a useless one. Adjusted R-squared penalises extra features based on the number of predictors and sample size, so it rises only if a new feature improves the model more than chance would. Use adjusted R-squared to compare linear models with different numbers of features.
A forest averages many trees trained on bootstrapped rows and random feature subsets, which cuts variance and overfitting at the cost of interpretability.
IoU measures how well a predicted box or mask overlaps the ground truth. It is the area of their intersection divided by the area of their union, giving a value from 0 for no overlap to 1 for a perfect match. In detection, a prediction usually counts as correct if IoU is at least 0.5 with a ground truth box of the same class. IoU is also used inside non-maximum suppression.
Named entity recognition finds and labels spans of text such as person names, organisations, locations, dates and amounts. For example, in an invoice email it can pull out the vendor, invoice number and total. It is usually framed as token classification with BIO tags. spaCy and fine-tuned transformer models are common tools. Domain-specific entities, like medicine names, usually need custom labelled training data.
09
Halfway through a test you discover a bug that broke the treatment for Android users. What do you do?
Stop or pause the affected part, fix the bug and restart the test with fresh data, since mixing broken and fixed periods biases results. Do not simply drop Android users from analysis afterwards, because that can break randomisation balance if the bug affected behaviour or logging. Document the incident, and add pre-launch checks such as running the variant through QA on every platform and monitoring guardrails in the first hours.
10
What is method chaining in Pandas and why do teams use it?
Method chaining writes a sequence of transformations as one expression, for example df.query(...).assign(...).groupby(...).agg(...). It avoids many temporary variables, reads top to bottom like a recipe, and reduces the risk of changing the wrong intermediate DataFrame. assign and pipe make chaining easy. The trade-off is that long chains are harder to debug, so split them into named steps when a chain grows past eight or ten operations.
11
How do you choose a learning rate for a neural network?
The MDE is the smallest true effect your test can reliably detect given the sample size, baseline rate, significance level and power. If baseline conversion is 5 percent and your MDE is 10 percent relative, you can detect a move to 5.5 percent but will likely miss smaller lifts. Choose the MDE from business value: the smallest change worth shipping. A smaller MDE needs a much larger sample, roughly growing with one over MDE squared.
13
Write Python code that validates prediction requests with Pydantic before passing them to a model.
def flatten(items):
out = []
for x in items:
if isinstance(x, list):
out.extend(flatten(x))
else:
out.append(x)
return out
print(flatten([1, [2, [3, 4]], 5])) # [1, 2, 3, 4, 5]
15
Your SQL result does not match the number on the official dashboard. How do you resolve it?
I would first align definitions: date range, time zone, filters like test users or cancelled orders, and whether the metric counts users or events. Then compare at a smaller grain, by day or by city, to find where the gap starts. I would read the dashboard's underlying query and check data refresh times. Once found, I would document the agreed definition so the same mismatch does not repeat.
16
A 10 million row DataFrame with a city column is using too much memory. How can the category dtype help?
The category dtype stores each unique value once and keeps small integer codes for every row. For a column like city with 50 unique values in 10 million rows, this can cut memory by more than 90 percent and speed up groupby and sorting. It helps when a column has low cardinality. It does not help for unique IDs or free text, and adding new categories later needs extra handling.
17
Pandas: find customers whose monthly spend increased for three consecutive months.
Putting features on comparable ranges using standardisation or min-max scaling. Distance-based and gradient-based models (KNN, SVM, regression, neural nets) need it; tree models do not.
19
What is DBSCAN and when is it better than K-means?
DBSCAN is a density-based clustering algorithm. It groups points that have at least min_samples neighbours within distance eps, and marks isolated points as noise. Unlike K-means, it does not need the number of clusters, finds clusters of any shape, and handles outliers. It struggles when clusters have very different densities and in high dimensions. It suits location data, like finding delivery hotspots from GPS points.
20
What is the difference between COUNT(*), COUNT(column) and COUNT(DISTINCT column)?
COUNT(*) counts all rows, including rows with NULLs. COUNT(column) counts only rows where that column is not NULL. COUNT(DISTINCT column) counts unique non-NULL values. For example, in an orders table, COUNT(*) is the number of orders, COUNT(coupon_code) is orders that used a coupon, and COUNT(DISTINCT customer_id) is the number of unique buyers. Mixing them up is a common reporting bug.
21
Write Python code to fit a Holt-Winters model and forecast the next 12 months.
Effect size measures how large a difference is, for example the absolute lift in conversion or Cohen's d for means. A p-value only says whether the difference is likely due to chance. With millions of users, a 0.01 percent lift can be significant yet useless for the business. Reporting effect size with a confidence interval tells decision makers both whether the effect is real and whether it is worth acting on.
23
What are polynomial features and what is the risk of using them?
Polynomial features add powers and products of existing features, like x squared and x times y, so a linear model can fit curves and interactions. The risk is that the number of features grows very fast with degree and input count, causing overfitting, slow training and multicollinearity. Use a low degree, scale features first, and add regularisation such as Ridge or Lasso to keep coefficients under control.
A context manager sets something up and guarantees cleanup when a block ends, even if an error is raised. You use it with the with statement, for example with open('data.csv') as f, which always closes the file. It works through __enter__ and __exit__ methods, or the contextlib.contextmanager decorator. In data work it is used for files, database connections, locks and timers, so resources are never left open.
A large language model is a neural network, usually a decoder-only transformer, trained on huge amounts of text to predict the next token. With billions of parameters and further instruction tuning, it can answer questions, summarise, write code and follow instructions. It does not look up facts; it generates likely text based on patterns learned in training, so it can be fluent but wrong. Data scientists use LLMs through APIs or open-weight models.
26
Write torchvision transforms for training and validation of an image classifier using ImageNet normalisation.
The ACF plot shows correlation between the series and its own lags, including indirect effects through intermediate lags. The PACF shows the correlation at each lag after removing the effect of shorter lags. For a stationary series, a PACF that cuts off after lag p suggests an AR(p) term, and an ACF that cuts off after lag q suggests an MA(q) term. Spikes at lag 7 or 12 reveal weekly or yearly seasonality.
28
Write pytest unit tests for a feature function that computes days since last purchase.
A baseline is the simplest reasonable prediction, such as predicting the most common class, last week's value or a basic logistic regression. It sets the minimum score any real model must beat. Without it, a 75 percent accuracy can look good when predicting the majority class already gives 80 percent. Baselines also catch pipeline bugs early and show whether extra complexity is worth it.
30
Write Python code to compare revenue per user between two groups using Welch's t-test.
Subword tokenisers split text into frequent pieces between characters and full words. Byte Pair Encoding starts from characters and repeatedly merges the most frequent pairs. WordPiece, used by BERT, is similar but chooses merges by likelihood. Rare words like unhappiness become un, happi, ness, so there are no unknown words and the vocabulary stays around 30,000 to 100,000. Token counts also decide LLM cost and context use.
32
Explain precision vs recall. When would you prefer recall?
Precision = TP / (TP + FP). Recall = TP / (TP + FN).
Prefer recall when missing a positive is costly — for example disease screening or fraud detection.
33
What is a model registry and why do teams use one?
A model registry is a central store for trained model versions along with their metadata: training data version, code commit, parameters, metrics and owner. Models move through stages such as staging, production and archived, with approvals. It gives one source of truth for which model is live, makes rollback to a previous version easy and supports audits. Tools like MLflow Model Registry are commonly used.
34
Write Pandas code to resample daily sales into weekly totals and monthly averages.
Pooling downsamples a feature map by summarising small regions. Max pooling keeps the largest value in each window, such as 2x2, and average pooling keeps the mean. It reduces computation, enlarges the receptive field of later layers and gives a little tolerance to small shifts. Many modern networks replace pooling with strided convolutions, but global average pooling before the classifier head is still very common.
36
Write Python code to find the top 3 most similar documents to a query using cosine similarity on embeddings.
System: You classify support tickets for an e-commerce company. Categories: payment, delivery, refund, account, other. Rules: choose exactly one category; if unsure, choose other; do not invent details. Return JSON with fields category and reason, reason under 20 words. Then two short examples showing a ticket and the expected JSON. User: Ticket: {ticket_text}. Keep the template fixed and test it on 100 labelled tickets before rollout.
All three are gradient boosting libraries. XGBoost grows trees level by level with strong regularisation and is very mature. LightGBM uses histogram binning and leaf-wise growth, so it is usually fastest on large data but can overfit small data without limits on leaves. CatBoost handles categorical features natively with ordered target statistics and uses symmetric trees, so it gives good results with little tuning. Choice depends on data size, categoricals and latency needs.
39
How do you turn text columns into features for a tabular model?
Simple options are length, word count and keyword flags. TF-IDF vectors capture important words and work well with linear models. For meaning, use sentence embeddings from a pretrained model and optionally reduce them with PCA. You can also train a separate text classifier and feed its predicted score as one feature. Fit any vocabulary or encoder on training data only to avoid leakage.
40
What is SARIMA and how does it extend a plain ARIMA model?
SARIMA adds seasonal terms to ARIMA. It is written ARIMA(p,d,q)(P,D,Q)m, where the second set are seasonal AR, differencing and MA orders, and m is the season length, such as 7 for daily data with a weekly cycle or 12 for monthly data. SARIMAX further allows external regressors like price or holidays. It handles one seasonal period well but struggles with multiple seasonalities, such as daily plus yearly.
Tips to crack the Coforge Data Science interview
Learn travel and insurance domain basics like bookings, policy lifecycle and claims, which are key Coforge verticals.
Revise SQL, Java or Python and testing concepts for the technical interview.
Know that Coforge was earlier called NIIT Technologies and be able to describe its industry-focused strategy.
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; Coforge interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the Coforge Data Science interview?
Candidates usually go through 4 stages: Online assessment (aptitude + reasoning); Technical MCQs or coding test; Technical interview; 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 Coforge Data Science interview?
This practice set leans on Machine Learning (7), Python for Data Science (5), MLOps and Model Deployment (4), Computer Vision (4). Revise those first, then practise explaining one or two of your own projects end to end, because most Coforge interviewers ask you to walk through real work.
Are these the exact questions asked at Coforge?
No. These are curated practice questions that match the skills and difficulty usually tested in it services interviews like Coforge's. They are not a leaked or verified list of past questions.
Where does Coforge hire Data Science professionals in India?
Coforge has large teams in Noida, Greater Noida, Bengaluru, Pune, Hyderabad. Openings and locations change often, so check the Coforge careers page and filter by city and experience.