Skip to main content
DevHivesBlog

Search the blog

Find a post by title, tag or topic

Machine Learning Interview Questions for Freshers (2026)

ML theory questions are now part of normal fresher hiring at Indian IT service companies. Prepare ten core questions with a three-part answer pattern, not ninety shallow ones.

Arnab Biswas11 min read
WhatsApp
A large question mark, representing the ML interview questions for freshers.

Say you get a TCS Digital interview call. You spend the week on arrays and a little SQL practice, because you expect a coding round. Then the panel asks about bias and overfitting, and follows up with "what is precision?" Your answers come out as memorised textbook lines, and the next question, "so when would you use it?", gets silence. This round is no longer rare: TCS's own CHRO says 60% of its FY26 fresher hires were AI-skilled.

Prepare ten core ML questions, not ninety. Answer each in three sentences: define the term, say when it applies, add one concrete detail. Service-company and global capability centre (GCC) AI-track panels ask 4 to 5 theory questions in a 20 to 30 minute round, and a four-week plan, which is my suggestion and not a measured result, is enough to cover them.

The ten questions, each answered below:

  1. What is supervised learning, and how is it different from unsupervised learning? (answer)
  2. What is overfitting, and how do you fix it? (answer)
  3. What is underfitting? (answer)
  4. What is the bias-variance tradeoff? (answer)
  5. What is a confusion matrix? (answer)
  6. Precision or recall: which would you choose, and why? (answer)
  7. Why can accuracy mislead? (answer)
  8. When would you use a decision tree, random forest or logistic regression? (answer)
  9. Random forest vs gradient boosting: what is the difference? (answer)
  10. What is a transformer, in plain words? (answer)

Why ML theory questions now reach every fresher round

TCS's CHRO Sudeep Kunnumal said that 60% figure is up from 10-15% three years earlier, speaking at the AI Impact Summit in March 2026, as reported by FACE Prep. That figure is about AI skills, not interviews, so the link to theory questions is my inference: they are becoming more common in fresher hiring. When the biggest fresher hirer in Indian IT wants AI skills, it is reasonable to expect a round that tests them.

AI skills went from a bonus to the norm in TCS fresher hiring
AI skills went from a bonus to the norm in TCS fresher hiring

The same FACE Prep page names where this round shows up: TCS Digital, Infosys DSE, Cognizant GenC Elevate and Amazon's applied-scientist internship track. These are the higher-paying tracks that freshers reappear for after clearing the basic test. If you only prepared coding, you are now underprepared for the exact role you wanted.

GCC roles add a twist. These teams often build models instead of only using them, so the follow-up questions go one level deeper. I compared the two kinds of first job in GCC vs IT services for your first job, and the interview difference is one of the bigger ones.

The good news is the round's size. A short round means the panel picks a few topics and pushes on them. Depth on a small set wins over shallow coverage of everything.

Watch: Machine Learning Interview Questions 2026 | ML Interview Questions And Answers 2026 | Simplilearn — Simplilearn (YouTube)

Use the define, apply, detail answer pattern

Panels reward a short answer with three parts, not a long recited definition. The FACE Prep coverage of these rounds points to the same thing: interviewers want to see that you understand when a concept matters, not that you memorised a paragraph.

  1. Define

    One plain sentence. Say what the thing is, in words you would use with a friend.

  2. Say when it applies

    One sentence about the situation where you would use it, or the problem it causes.

  3. Add one concrete detail

    A real example, a formula, or a fix. This is the part that proves you are not reciting.

Here is the pattern on the most common opening question. Say the panel asks, "What is supervised learning?" A memorised answer runs for a full minute about "a paradigm where an algorithm learns a mapping function." A three-part answer sounds like this:

"It is learning from examples where the right answer is already attached. You use it when you know exactly what you want to predict. A bank predicting loan default from past loans, where each old loan is marked as repaid or defaulted, is supervised learning."

That answer takes about fifteen seconds. It also invites a good follow-up, which you can then answer, instead of a confused one.

Supervised vs unsupervised learning

Supervised learning trains on labelled examples to predict a known target, while unsupervised learning finds structure in data with no labels. Codegnan's 2026 question bank covers the same split in its foundations section. Spam detection is the classic supervised case: every training email is already tagged spam or not spam. Customer grouping with k-means is the classic unsupervised case: you hand over purchase data and the algorithm forms groups nobody named in advance.

SupervisedUnsupervised
DataLabelled (input plus correct answer)Unlabelled (input only)
GoalPredict a known targetFind groups or patterns
Typical tasksClassification, regressionClustering, dimensionality reduction
ExampleSpam filterCustomer segments with k-means
Checking resultsCompare predictions with true labelsHarder: no right answer to compare with

Expect one follow-up here. Panels often ask about semi-supervised learning, which uses a small labelled set plus a large unlabelled one. The last table row is a good thing to mention unprompted, because it shows you have thought about evaluation.

Overfitting, underfitting and the bias-variance tradeoff

A model overfits when it memorises training data and fails on new data, and bias-variance is the tension between being too simple and too sensitive, as the GeeksforGeeks interview set frames it. Underfitting is the opposite problem: the model is too simple to catch the pattern, so it does badly even on training data.

Map them like this. High bias means underfitting. High variance means overfitting. A good model sits between the two, and you find that point by testing on data the model never saw.

The fixes are what the panel wants to hear:

  • Regularization: add a penalty for large weights. L1 (Lasso) can push some weights to zero; L2 (Ridge) shrinks them all.
  • More data: harder to memorise when there is more to memorise.
  • Cross-validation: split the data into several folds and test on each in turn, so one lucky split cannot fool you. The scikit-learn cross-validation guide shows how.

If you can show the gap in code, do it. This short script trains two decision trees on the same data:

from sklearn.datasets import make_classification
from sklearn.model_selection import train_test_split
from sklearn.tree import DecisionTreeClassifier
X, y = make_classification(n_samples=500, n_features=20, flip_y=0.1, random_state=0)
X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=0)
deep = DecisionTreeClassifier(random_state=0).fit(X_train, y_train)
print("deep    train:", deep.score(X_train, y_train), "test:", deep.score(X_test, y_test))
shallow = DecisionTreeClassifier(max_depth=3, random_state=0).fit(X_train, y_train)
print("shallow train:", shallow.score(X_train, y_train), "test:", shallow.score(X_test, y_test))

The deep tree gets a perfect training score and a clearly lower test score. That gap is overfitting you can point at. The shallow tree usually shows a much smaller gap, because limiting depth works like regularization.

Precision, recall, F1 and the confusion matrix

Precision asks how many flagged cases were right, recall asks how many real cases were found, and F1 balances the two. Codegnan's evaluation section builds all three on the confusion matrix, so learn its four cells first:

  • True positive (TP): predicted yes, really yes.
  • False positive (FP): predicted yes, really no.
  • False negative (FN): predicted no, really yes.
  • True negative (TN): predicted no, really no.

Precision is TP divided by (TP + FP). Recall is TP divided by (TP + FN). F1 is the harmonic mean of the two, an average that stays low if either number is low. The scikit-learn metrics page has the formulas and the functions you would call.

The question that separates answers is "which one would you choose?" Here is how to decide:

MetricQuestion it answersChoose it whenExample
PrecisionOf what I flagged, how much was right?A false alarm is costlySpam filter: losing a real email hurts
RecallOf what was really there, how much did I catch?A miss is costlyDisease screening: missing a patient is worse than a retest
F1Am I balanced?Both errors matter and classes are unevenFraud detection with very few fraud cases
AccuracyHow often am I right overall?Classes are roughly equalA balanced cat vs dog image set

Mention why accuracy misleads on uneven data. If almost every transaction is genuine, a model that says "genuine" every time looks accurate and catches zero fraud. Panels like hearing that trap named.

Core algorithms freshers get asked about

Interviewers usually stop at linear and logistic regression, decision trees, random forest, KNN, k-means and SVM, and ask when you would pick each. The Codegnan question bank covers the same set. Learn one "use it when" line for each:

  • Linear regression: use it when you predict a number, like house price, and the relationship is roughly a straight line.
  • Logistic regression: use it for yes/no predictions when you want a simple model you can explain. Despite the name, it classifies.
  • Decision tree: use it when you need rules a manager can read. It overfits easily on its own.
  • Random forest: use it as a strong default for table data. Many trees vote, which cuts overfitting.
  • KNN: use it on small datasets where similar items share labels. It gets slow as data grows, because it compares against every stored point.
  • K-means: use it to group unlabelled data when you can guess how many groups you want.
  • SVM: use it for classification with clear margins between classes, especially with many features and modest data.

Expect "random forest vs gradient boosting" as a follow-up. Random forest builds trees in parallel on random samples and averages them. Gradient boosting builds trees one after another, each fixing the errors of the last, so it is often more accurate but easier to overfit.

On AI-track rounds, you may get one question on transformers. Keep it plain: a transformer is a neural network that uses attention to weigh how much each word in a sentence relates to every other word. It is the base of large language models. If you want the full skill list for these roles, see skills required for an AI engineer fresher in 2026.

A 4-week study plan for service-tier and AI-track rounds

Spend each week on one block, and add depth in weeks three and four only if you are aiming for an AI-track or GCC role. The left column is enough for most service-company rounds. The right column is what changes the conversation at a GCC.

WeekTopicsService-tier rounds needAI-track and GCC depth
Week oneFoundations, supervised vs unsupervisedThree-part answers for learning types, features, labels, train/test splitSemi-supervised learning, why data leakage ruins results
Week twoCore algorithmsOne "use it when" line per algorithm in the list aboveHow gradient boosting fixes errors, what kernels do in SVM
Week threeEvaluation metrics, overfittingConfusion matrix by hand, precision vs recall choice, regularizationROC curve and AUC, k-fold cross-validation in code
Week fourProjects plus one Python drillExplain one project end to end: data, model, metric, what went wrongTrain and evaluate a model in scikit-learn without notes; one transformer-based demo

Each evening, close the notes and answer two questions aloud in three sentences. Writing an answer feels finished. Saying it shows you where you get stuck.

If this plan makes you curious about the job itself, read what ML engineer freshers earn in India in 2026 before you choose which track to apply for.

Machine learning interview questions for freshers: PDF and data science FAQ

A PDF is fine for revision, but you should practise answering aloud, and data science rounds add statistics and SQL on top of the same ML core.

Is there a machine learning interview questions for freshers PDF?

Several sites offer one. Use it for revision on the train or bus. Do not use it as your main preparation: a PDF trains reading, and the panel tests speaking.

How are machine learning interview questions for data science different?

The ML core is the same. Data science rounds then add statistics (mean vs median, hypothesis tests, p-values) and SQL queries on a sample table. Expect more "how would you analyse this data?" questions and fewer about deploying models.

Do I need deep learning as a fresher?

For a service-tier round, a basic idea of neural networks is enough. For AI-track or GCC roles, know what a transformer does in plain words. If you are still choosing a path, how to become an ML engineer after 12th shows where deep learning fits in the order of learning.

How many questions should I prepare?

Prepare the ten core questions from the list near the top well, then add follow-ups for each. A panel that asks a few questions will go deep on one, so depth on fewer topics is safer than a long list you half know.

Pick ten questions from this post today. Answer each one aloud in three sentences and record yourself on your phone. Listen once, fix the answer that sounded weakest, and start week one of the plan tomorrow. If your interview is within a week, skip the plan and drill these ten questions daily.

ShareWhatsAppLinkedInX

Picked from the tags and topic of this post.

Four interview rounds with the next one open, showing Mphasis's multi-stage process.
career growth9 min read

Mphasis Interview Questions for .NET Developer: Fresher Guide 2026

Clear Mphasis's AMCAT test, group discussion, technical round and HR round with the exact topics asked. Practice the C#, OOP, SQL, LINQ, and EF Core questions from this post. Read the 24-month bond terms before you sign and follow a 30-day prep plan to pass.

Arnab Biswas
Python logo versus a Google Gemini sparkle logo, representing the software engineer vs prompt engineer decision.
career growth8 min read

Software Engineer vs Prompt Engineer for Freshers in 2026

Standalone prompt engineer roles dropped by about 30% between 2024 and 2026, while roles requiring prompt skills tripled. Here's why freshers should build software engineering fundamentals first and layer prompt skills on top, not chase a shrinking title.

Arnab Biswas
A staircase of five steps with a flag on top, representing the career path from school to machine learning engineer.
career growth9 min read

How to Become a Machine Learning Engineer After 12th (2026)

You will almost certainly not be hired as a machine learning engineer straight out of class 12, and that is normal. This guide shows the realistic route: a B.Tech, a first job in a production-data role, and the one skill that raises your pay before graduation.

Arnab Biswas