36 practice questions with answers for Data Science interviews in Visakhapatnam.
Data Science jobs in Visakhapatnam
Visakhapatnam (Vizag) has a developing IT market with delivery centres, start-ups and IT parks around Rushikonda. Many local candidates also apply to Hyderabad and remote roles, so a mix of service and product styles is common.
Below are 36 questions that match the mix of service, product and domain employers hiring data scientists in Visakhapatnam.
Solved for VisakhapatnamStart 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.
Use grid search, random search or Bayesian optimisation with cross-validation, starting with a coarse random search and narrowing the promising ranges.
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.
03
Write a prompt template for classifying customer support tickets.
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.
04
A deep network you built from scratch does not learn at all; the loss stays flat from the first epoch. Could weight initialisation be the reason?
If weights start too large, activations and gradients explode; if too small, they vanish, and training stalls. If all weights are equal, every neuron learns the same thing. Good schemes keep the variance of activations stable across layers: Xavier or Glorot initialisation for tanh and sigmoid, and He initialisation for ReLU. Frameworks use sensible defaults, but it matters when building custom layers or very deep networks.
05
How do you use groupby with multiple aggregations?
It checks whether observed category counts differ from expected counts, used for independence between two categorical variables and for goodness of fit.
07
After one-hot encoding you have 2,000 features and training is slow. What do you do?
Find which columns caused the explosion, usually a few high-cardinality categoricals. Group rare categories into Other, or switch those columns to frequency, target or hashing encoding. Use sparse matrices so zeros take no memory. Tree libraries like LightGBM and CatBoost can handle categoricals natively without one-hot. Then remove near-constant columns and check that validation scores hold up with the smaller feature set.
08
Write a Python function to compute IoU between two bounding boxes given as (x1, y1, x2, y2).
Situation: our document classifier mislabelled several legal notices, and the client was upset. Task: explain clearly and restore confidence. Action: I showed the misclassified examples, explained that they used a format absent from training data, and avoided jargon. I proposed adding those samples, a confidence threshold for human review and weekly error reports. Result: errors on that format fell sharply and the client extended the project.
10
Tell me about a time you found a data quality issue using SQL.
Situation: during my internship I was building a monthly sales report. Task: make sure numbers were correct before sharing. Action: I compared order counts per day and noticed one day had double the usual orders. A GROUP BY on order_id showed every order that day appeared twice because a load job had run twice. Result: I reported it, the data team removed duplicates and added a uniqueness check. Now I always validate row counts.
11
What are hybrid search and reranking in retrieval systems?
Hybrid search combines keyword search, like BM25, with vector search. Keywords catch exact matches such as product codes and names, while vectors catch meaning and paraphrases. Results are merged, often with reciprocal rank fusion. Reranking then takes the top 20 to 50 candidates and scores each one against the query with a cross-encoder model, which is slower but more accurate. Together they usually improve RAG answer quality noticeably.
12
What does the axis parameter mean in NumPy and Pandas?
axis tells an operation which direction to work along. axis=0 works down the rows, so df.sum(axis=0) gives one total per column. axis=1 works across columns, so df.sum(axis=1) gives one total per row. In df.drop, axis=1 means drop columns and axis=0 means drop rows. A simple way to remember it: the axis you name is the one that gets collapsed or removed.
13
What is the difference between hard voting and soft voting in ensembles?
In hard voting each model predicts a class and the majority wins. In soft voting each model gives class probabilities, they are averaged, and the class with the highest average wins. Soft voting usually works better because it uses each model's confidence, but it needs calibrated probabilities from all models. Hard voting is simpler and works even with models that only output labels.
Differencing replaces each value with the change from the previous value: y_t minus y_(t-1). It removes a linear trend and often makes a series stationary. Seasonal differencing subtracts the value one season back, such as y_t minus y_(t-7) for daily data with a weekly cycle. Avoid over-differencing, because it adds noise and negative autocorrelation. In ARIMA, the d parameter is the number of times you difference.
15
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.
Gradients shrink as they pass through many layers (for example with sigmoid), so early layers barely learn. ReLU, residual connections and good initialisation help.
17
What is positional encoding in transformers and why is it needed?
Self-attention treats input tokens as a set, so without extra information it cannot tell word order: dog bites man and man bites dog look the same. Positional encoding adds position information to each token embedding. The original transformer used fixed sine and cosine patterns; BERT learned position embeddings; many modern LLMs use rotary embeddings, which encode relative positions and extend better to longer contexts.
18
What is the randomisation unit in an experiment, and why does it matter?
The randomisation unit is what you assign to variants: a user, a session, a device, a page view or even a city. Choosing user-level keeps each person's experience consistent and avoids contamination. The analysis unit should match the randomisation unit, because if you randomise by user but analyse by page view, observations are correlated and standard errors come out too small, producing false positives. Use the delta method or bootstrap when they differ.
Bootstrapping estimates the uncertainty of a statistic by resampling your data with replacement many times, computing the statistic on each resample, and looking at the spread of results. It gives confidence intervals for things with no simple formula, like the median, a ratio or a model metric such as AUC. It needs no normality assumption, but it relies on the sample being representative and can be slow on very large data.
20
What is the difference between one-hot, label and ordinal encoding?
One-hot encoding creates a binary column per category and suits nominal data like city for linear models. Label encoding maps categories to integers arbitrarily; it is fine for tree models but implies a false order for linear models. Ordinal encoding also uses integers but in a meaningful order, like low, medium, high mapped to 0, 1, 2. Choose based on whether categories have a natural order and which model you use.
21
How does linear regression work and what are its assumptions?
It fits a line minimising squared error. Assumes linearity, independent errors, constant variance (homoscedasticity), normally distributed residuals and no strong multicollinearity.
22
Write SQL to compute a running total of spend for each user.
SELECT user_id, order_date, amount,
SUM(amount) OVER (
PARTITION BY user_id
ORDER BY order_date
ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
) AS running_spend
FROM orders
ORDER BY user_id, order_date;
23
Write SQL to calculate month-over-month revenue growth.
WITH monthly AS (
SELECT DATE_TRUNC('month', order_date) AS month, SUM(amount) AS revenue
FROM orders
GROUP BY 1
)
SELECT month, revenue,
LAG(revenue) OVER (ORDER BY month) AS prev_revenue,
ROUND(100.0 * (revenue - LAG(revenue) OVER (ORDER BY month))
/ NULLIF(LAG(revenue) OVER (ORDER BY month), 0), 2) AS mom_pct
FROM monthly;
It applies Bayes' theorem assuming features are independent given the class. The assumption is rarely true but the model is fast and works well for text.
25
What does CI/CD mean for machine learning projects?
Continuous integration runs automatic checks on every code change: unit tests for feature code, data validation, linting and a quick training run on sample data. Continuous delivery packages the model and service, for example as a Docker image, and deploys it through staging to production after evaluation gates, such as the new model beating the current one on a holdout set. Some teams add continuous training, which retrains on new data automatically.
26
How would you build RFM features for a customer churn model?
RFM stands for recency, frequency and monetary value. From the transactions table, for each customer as of a cut-off date: recency is days since the last purchase, frequency is the number of orders in the last 90 days, and monetary is total or average spend in that window. Compute them using only data before the cut-off, add trends like spend this month versus last, and the label from the period after.
A shallow copy duplicates the outer object but shares nested objects. A deep copy (copy.deepcopy) recursively duplicates everything, so changes to nested items do not leak.
Convolution filters slide over the input to detect local patterns, pooling reduces size, and deeper layers combine edges into shapes and objects. Used mainly for images.
30
Write PyTorch code to fine-tune a pretrained ResNet-18 for a 5-class problem by replacing its final layer.
import torch, torch.nn as nn
from torchvision import models
model = models.resnet18(weights=models.ResNet18_Weights.DEFAULT)
for p in model.parameters():
p.requires_grad = False # freeze backbone
model.fc = nn.Linear(model.fc.in_features, 5)
opt = torch.optim.AdamW(model.fc.parameters(), lr=1e-3)
loss_fn = nn.CrossEntropyLoss()
# train head first, then unfreeze later layers with a lower lr
31
What is stationarity and why do many forecasting models need it?
A stationary series has a constant mean, constant variance and an autocorrelation structure that does not change over time. Classical models like ARMA assume stationarity because they learn fixed relationships between past and present values; if the mean keeps drifting, those relationships break. You usually make a series stationary by differencing to remove trend, seasonal differencing to remove seasonality, and a log transform to stabilise growing variance.
MLOps is the set of practices that take machine learning models from experiments to reliable production and keep them working. It covers versioning data and code, tracking experiments, automated training pipelines, testing, deployment, monitoring and retraining. It borrows ideas from DevOps but adds data and model concerns, because a model can fail even when the code has not changed, simply because the data has.
33
What is chunking in RAG and how do you choose a chunk size?
Chunking splits documents into smaller pieces before embedding them, so retrieval returns focused passages that fit in the prompt. Small chunks, like 200 tokens, are precise but lose context; large chunks, like 1,000 tokens, keep context but add noise and cost. Split on natural boundaries such as headings and paragraphs, add some overlap, and keep metadata like title and section. Then tune chunk size using retrieval metrics on real questions.
34
What is standard deviation and what does it tell you?
A Series is a one-dimensional labelled array: one column of values with an index. A DataFrame is a two-dimensional table made of several Series that share the same index, and each column can have its own dtype. Selecting one column, like df['price'], gives you a Series. Selecting with a list, like df[['price']], gives you a DataFrame. Many methods work on both, but the output shape is different.
Transformers use self-attention to process all tokens in parallel and capture long-range context, making them faster to train and more scalable than sequential RNNs.
Few big employers listed in Visakhapatnam?
Many Visakhapatnam candidates also apply to teams in Hyderabad and to remote or hybrid roles. Practise the Hyderabad set as well.
Which companies hire Data Science professionals in Visakhapatnam?
Companies with large offices in Visakhapatnam include many IT services and product firms. Use their company pages below to practise employer-specific sets.
Are Data Science interviews in Visakhapatnam different from other cities?
The questions depend more on the company than the city. Visakhapatnam's mix of employers decides the style: Many local candidates also apply to Hyderabad and remote roles, so a mix of service and product styles is common
How do I find Data Science jobs in Visakhapatnam?
Shortlist companies with Visakhapatnam offices, keep your CV focused on Data Science projects, apply on company career pages and job portals with the Visakhapatnam filter, and practise the questions on this page before each interview.