CD-802-D Machine Learning for Data Science

Machine Learning for Data Science (CD-802-D) Important Questions

RGPV · B.Tech · CSE-DS · Semester 8 · Current scheme · 1 papers (2026 to 2026)

  1. Read the answers

    Start with the topics that come every year.

  2. Revise unit notes

    Go through each unit once to score more.

Paperwala Imp Topics - Machine Learning for Data Science important questions

Download Paperwala Imp Question & Answer (PDF)

Counted from the questions in the past papers listed on this site. Repeated = how many times the topic came in those papers.

Machine Learning for Data Science important questions with answers

Each answer starts with the short answer. Then come the points to write, a diagram and an exam tip. The questions under each topic are copied from the RGPV papers.

Q1. Motivation for machine learning and generalization

Asked 1 time in 2026 · Unit 1

From the papers

  • “Discuss the motivation for studying Machine Learning and analyze the concept of generalization in Machine Learning systems.” (May 2026)

The short answer

Machine learning (ML) lets a computer learn a rule from examples instead of being given the rule by a programmer. Generalization is the ability of the learned model to give correct answers on new data it has never seen.

Write these points

Motivation: why study ML

  • Some rules are too hard to write by hand, such as reading handwriting or spotting fraud.
  • Data is now large. Phones, banks and sensors produce more than any person can study.
  • Rules change over time. A learned model can be retrained on new data.
  • ML personalises: recommendations, search and voice assistants.
  • Cheaper computers and better algorithms made it practical.

Generalization

  • Training error is the error on data used for learning. Test error is the error on new data.
  • A model that memorises the training data has a low training error but a high test error. This is overfitting.
  • A model that is too simple misses the pattern. This is underfitting.
  • Bias is error from wrong assumptions (too simple). Variance is error from too much sensitivity to the training set (too complex).
  • Total expected error = bias squared + variance + noise. The aim is the best balance, the bias variance trade off.

How to get good generalization

  1. Keep a separate test set and never train on it.
  2. Use enough data and remove noise.
  3. Choose a model of suitable size. Use regularization.
  4. Use cross validation to compare models.

Spotting overfitting.

A model gets 2 percent error on 1,000 training emails but 15 percent on 300 new emails.

The gap is 15 - 2 = 13 points. A large gap shows overfitting.

A simpler model with 6 percent training error and 8 percent test error generalizes better. Its gap is only 2 points.

Real-life example

A student who learns the answers of last year's paper by heart scores well on that paper only. A student who understands the ideas scores well on any paper. ML wants the second kind of student.

Figure: training error and test error
Figure: training error and test error

Same or opposite: overfitting and underfitting

PointOverfittingUnderfittingSame or opposite
Training errorVery lowHighOpposite
Test errorHighHighSame
Main causeModel too complexModel too simpleOpposite
FixMore data, regularizationMore features, bigger modelOpposite

Exam tip. Define ML and generalization in two lines. Draw the error against complexity curve with training and test error. Add the bias variance point and one numeric example.

Back to the topic list

Q2. VC dimension and PAC learning

Asked 1 time in 2026 · Unit 1

From the papers

  • “Explain Vapnik-Chervonenkis (VC) Dimension and Probably Approximately Correct (PAC) Learning with suitable examples” (May 2026)

The short answer

The VC dimension of a hypothesis class is the largest number of points it can shatter, that is label in every possible way. PAC learning asks how many examples are enough so that, with high probability, the learned hypothesis has a small error.

Write these points

VC dimension

  • A class shatters a set of n points if for all 2^n labellings some hypothesis in the class separates them.
  • VC dimension is the size of the largest set that can be shattered. A bigger number means a more flexible model.
  • A straight line in a plane has VC dimension 3. It can split any labelling of 3 points but not the 4 point XOR layout.
  • Axis aligned rectangles have VC dimension 4. Intervals on a line have VC dimension 2.
  • A high VC dimension needs more data and risks overfitting.

PAC learning

  1. Close to correct: the error is at most epsilon.
  2. Probably: this holds with probability at least 1 - delta.
  3. A learner is PAC if it needs only a number of examples that grows slowly (polynomial) in 1/epsilon and 1/delta.
  4. For a finite hypothesis class H and a hypothesis that fits all training data, the sample size is m >= (1/epsilon) x (ln |H| + ln (1/delta)).

How many examples are enough.

Take |H| = 1,024 hypotheses, epsilon = 0.1 and delta = 0.05.

m >= 10 x (ln 1024 + ln 20) = 10 x (6.93 + 3.00) = 99.3, so 100 examples.

Halve epsilon to 0.05 and the need doubles to about 199 examples.

Remember. The finite class bound above assumes the data are noise free and some hypothesis in H fits them all. Textbooks give other bounds for other settings.

Real-life example

A driving test cannot ask every road situation. If the examiner picks enough random situations and you pass all, it is probably true that you will do well on a new road. PAC learning puts a number on how many tests are enough.

Figure: a line shatters 3 points but not 4
Figure: a line shatters 3 points but not 4

Same or opposite: VC dimension and PAC learning

PointVC dimensionPAC learningSame or opposite
MeasuresCapacity of a model classSamples needed for a guaranteeOpposite
OutputA number such as 3A bound such as m >= 100Opposite
Connects model size to data sizeYesYesSame
IdeaShattering pointsProbably and nearly correctOpposite

Exam tip. Define shatter first. Show the 3 points versus 4 points picture for a line. Then write epsilon, delta and the sample size formula with one number example.

Back to the topic list

Q3. Supervised learning: architecture and workflow

Asked 1 time in 2026 · Unit 2

From the papers

  • “Define supervised learning and discuss the architecture and workflow of supervised learning models” (May 2026)

The short answer

Supervised learning learns a function from labelled examples, pairs of an input x and the correct output y. The trained model then predicts y for new inputs.

Write these points

Types

  • Classification: y is a category such as spam or not spam.
  • Regression: y is a number such as a house price.

Architecture (main parts)

  1. Training data: inputs and labels.
  2. Feature extraction: turn raw data into numbers.
  3. Model (hypothesis): a function with parameters, for example a line or a tree.
  4. Loss function: measures the gap between prediction and label.
  5. Optimizer: changes the parameters to reduce the loss, for example gradient descent.
  6. Evaluation: metrics on data not used for training.

Workflow

  • Collect and clean data. Split into training, validation and test sets.
  • Choose a model. Train it. Tune the hyperparameters on the validation set.
  • Report the final score once on the test set.
  • Deploy. Watch the performance and retrain when the data changes.
AlgorithmTypeExample use
Linear regressionRegressionPredict price
Logistic regressionClassificationLoan default
Decision treeBothDiagnosis rules
SVMClassificationText topic

A tiny regression.

Hours studied x = 1, 2, 3, 4, 5 and marks y = 2, 4, 5, 4, 6.

Least squares gives marks = 1.8 + 0.8 x hours. Check: the means are 3 and 4.2, so 4.2 - 0.8 x 3 = 1.8.

For 6 hours the model predicts 1.8 + 0.8 x 6 = 6.6.

Real-life example

A teacher shows a child many fruit pictures with names. After enough examples the child names a new fruit correctly. The pictures with names are the labelled data.

Figure: supervised learning workflow
Figure: supervised learning workflow

Same or opposite: supervised and unsupervised learning

PointSupervisedUnsupervisedSame or opposite
Labels in the dataYesNoOpposite
Typical taskClassification, regressionClusteringOpposite
Learns from examplesYesYesSame
Measure of successError against labelsCluster qualityOpposite

Exam tip. Define it with the word labelled. Draw the workflow as boxes. Name one classification and one regression example.

Back to the topic list

Q4. Regression, probabilistic classifiers and ensembles compared

Asked 1 time in 2026 · Unit 2

From the papers

  • “Evaluate regression techniques, probabilistic classifiers and ensemble learning methods in terms of prediction accuracy and computational efficiency.” (May 2026)

The short answer

Regression models, probabilistic classifiers and ensembles trade accuracy against cost. Simple models are fast, while ensembles are usually the most accurate but cost more.

Write these points

Comparison

MethodAccuracyTraining costPrediction cost
Linear regressionGood if the link is linearLowVery low
Logistic regressionGood, gives probabilitiesLowVery low
Naive BayesFair, assumes independenceVery low (counting)Very low
Random forest (bagging)High, stableMedium to highMedium
BoostingOften highest on tablesHigh, runs in sequenceMedium

Points to write

  • Regression: least squares is solved in one step. Easy to read, but weak on curved patterns.
  • Naive Bayes: needs very little data and time. Wrong when features depend on each other.
  • Logistic regression: a linear boundary with calibrated probabilities.
  • Bagging: averages many models on random samples. Reduces variance. Can run in parallel.
  • Boosting: adds models that fix earlier errors. Reduces bias. Runs one after another and can overfit noise.

How to decide

  1. Start with a simple model as the baseline.
  2. Move to an ensemble only if the gain in accuracy is worth the extra time and memory.
  3. Compare on a validation set with the same split.

Least squares by formula.

Data (1,2), (2,4), (3,5), (4,4), (5,6). Slope = sum of (x - 3)(y - 4.2) / sum of (x - 3)^2 = 8 / 10 = 0.8. Intercept = 1.8.

Sum of squared errors = 2.4. A flexible ensemble would fit the five points closer but may overfit so few data.

Real-life example

To predict tomorrow's electricity use, a quick line through past data is cheap and fine for a rough plan. A grid company that needs every percent would pay for a forest of models that vote.

Figure: which model to try first
Figure: which model to try first

Same or opposite: bagging and linear regression

PointBagging (forest)Linear regressionSame or opposite
Prediction accuracy on complex dataHigherLowerOpposite
ComputationHeavyLightOpposite
Can predict numbersYesYesSame
Easy to explainHarderEasyOpposite

Exam tip. Use a table with accuracy and cost columns. Write one line of trade off for each group. End with the advice to start with a simple baseline.

Back to the topic list

Q5. Expectation Maximization (EM) algorithm

Asked 1 time in 2026 · Unit 3

From the papers

  • “Explain the Expectation Maximization (EM) algorithm in detail. Discuss its iterative optimization process and applications in probabilistic Machine Learning systems” (May 2026)

The short answer

Expectation Maximization (EM) finds maximum likelihood parameters of a model with hidden variables. It repeats an E step that guesses the hidden values softly and an M step that re estimates the parameters.

Write these points

EM for a Gaussian mixture model (GMM)

  • Data come from K bell curves with means mu_k, variances s_k^2 and weights pi_k. Which curve made each point is hidden.
  • Model: p(x) = sum over k of pi_k x N(x | mu_k, s_k^2).
  1. Initialize means, variances and weights.
  2. E step: for each point compute the responsibility r_ik = pi_k N(x_i | k) / sum over j of pi_j N(x_i | j).
  3. M step: N_k = sum of r_ik. New mu_k = sum of r_ik x_i / N_k. New variance from the weighted squared gaps. New pi_k = N_k / n.
  4. Compute the log likelihood. Repeat until it stops rising.

Properties

  • Each full iteration never lowers the likelihood. It may stop at a local best, so try several starts.
  • K-means is the hard assignment version of EM with equal round clusters.
  • Applications: soft clustering, missing data, hidden Markov models (Baum Welch), topic models, image segmentation.

One EM step on six numbers.

Data 1, 2, 4, 7, 8, 10. Start: means 2 and 9, variances 4 and 4, weights 0.5 and 0.5.

E step for x = 4: responsibility 0.932 for curve 1 and 0.068 for curve 2. For x = 7: 0.068 and 0.932.

M step: N = (3.01, 2.99). New means 2.43 and 8.26. New variances 2.11 and 1.98. Weights 0.502 and 0.498.

After a second step the means are 2.34 and 8.31 and they change little, so EM has nearly converged.

Real-life example

A teacher finds two answer sheets mixed with no names. She guesses by handwriting which sheet belongs to which student, says how sure she is, then learns each student's style from her guesses. She repeats until the guesses stop changing. That loop is EM.

Figure: EM on one dimensional data
Figure: EM on one dimensional data

Same or opposite: E step and M step

PointE stepM stepSame or opposite
Works onHidden variablesParametersOpposite
OutputResponsibilities rNew means, variances, weightsOpposite
Repeated until the likelihood settlesYesYesSame
UsesCurrent parametersCurrent responsibilitiesOpposite

Exam tip. Name the GMM model. Write the E step and the M step formulas. Add the small numeric run to show the responsibilities.

Back to the topic list

Q6. K-means clustering and K-NN compared

Asked 1 time in 2026 · Unit 3

From the papers

  • “Compare K-means clustering and K-NN algorithms on the basis of learning methodology and applications.” (May 2026)

The short answer

K-means is an unsupervised method that groups unlabelled data into K clusters by repeating assignment and mean update. K-NN is a supervised method that labels a new point by the vote of its K nearest labelled neighbours.

Write these points

K-means steps

  1. Choose K and start with K centres.
  2. Assign every point to its nearest centre.
  3. Move each centre to the mean of its points.
  4. Repeat until the assignments stop changing.

K-NN steps

  1. Keep all labelled training points. There is no training step (lazy learning).
  2. For a new point find the K nearest points by distance.
  3. Give it the majority class (or the average value for regression).
BasisK-meansK-NN
Learning typeUnsupervisedSupervised
Labels neededNoYes
TrainingIterative, finds centresNone, stores data
OutputCluster idsClass or value
ApplicationsCustomer segments, image coloursRecommendation, handwriting, medical diagnosis

K-means on 7 points.

Points (1,1), (1.5,2), (3,4), (5,7), (3.5,5), (4.5,5), (3.5,4.5). Start centres (1,1) and (5,7).

Round 1 groups: first three points and the last four. New centres (1.83, 2.33) and (4.13, 5.38).

Round 2 moves (3,4) to the second group. New centres (1.25, 1.5) and (3.9, 5.1). Round 3 changes nothing, so it stops.

K-NN with K = 3: query (2,2) with labelled points A(1,1) class 0, B(1.5,2) class 0, C(3,4) class 1. Distances 1.41, 0.5, 2.24. Votes 0, 0, 1 give class 0.

Real-life example

K-means is a teacher sorting a pile of unmarked test copies into groups by handwriting. K-NN is a new student asking the 3 nearest neighbours which tuition class they joined and copying the majority.

Figure: K-means and K-NN
Figure: K-means and K-NN

Same or opposite: K-means and K-NN

PointK-meansK-NNSame or opposite
Learning typeUnsupervisedSupervisedOpposite
Needs labelled dataNoYesOpposite
Uses distance between pointsYesYesSame
K meansNumber of clustersNumber of neighboursOpposite

Exam tip. Put the table first, since the question says compare. Show both procedures in short steps. Avoid mixing the two meanings of K.

Back to the topic list

Q7. Artificial neural network and multilayer perceptron

Asked 1 time in 2026 · Unit 4

From the papers

  • “Define Artificial Neural Networks and explain the architecture and working principle of multilayer perceptron models in Machine Learning systems” (May 2026)

The short answer

An artificial neural network (ANN) is a model of connected neurons that each pass a weighted sum through an activation function. A multilayer perceptron (MLP) stacks an input layer, hidden layers and an output layer.

Write these points

Architecture of an MLP

  • Input layer: one unit per feature.
  • Hidden layers: each unit computes f(w.x + b). The activation f is non linear (ReLU, tanh, sigmoid).
  • Output layer: softmax or sigmoid for classes, linear for numbers.
  • Layers are fully connected and signals move forward only (feed forward).

Working principle

  1. Forward pass: compute each layer from the one before.
  2. Loss: compare the output with the target.
  3. Back propagation: use the chain rule to get the gradient of the loss for every weight.
  4. Update: weights move against the gradient (gradient descent).
  5. Repeat over many mini batches (epochs).
  • One hidden layer with enough units can approximate any smooth function (universal approximation).
  • Without a non linear activation the whole MLP collapses to one linear model.

Forward pass of a 2-2-1 network.

Input (1, 0). Hidden weights [[2,2],[-2,-2]] and biases (-1, 3). Sigmoid everywhere.

Hidden sums 2 x 1 + 0 - 1 = 1 and -2 x 1 - 0 + 3 = 1. Both outputs sigmoid(1) = 0.731.

Output weights (2, 2) and bias -3: sum = 2.924 - 3 = -0.076. Output = sigmoid(-0.076) = 0.481.

Real-life example

A bank form goes through three desks. Desk one copies the entries. Desk two judges income and history. Desk three decides. Wrong results send feedback back through the desks, which is back propagation.

Figure: a forward pass through an MLP
Figure: a forward pass through an MLP

Same or opposite: single perceptron and MLP

PointSingle perceptronMLPSame or opposite
Hidden layersNoneOne or moreOpposite
Can learn XORNoYesOpposite
Trained by gradient based updatesYesYesSame
Decision boundaryStraight lineCurvedOpposite

Exam tip. Draw the layers with arrows. Write the five training steps. Say "non linear activation" clearly, since it is what makes hidden layers useful.

Back to the topic list

Q8. ReLU against sigmoid and tanh

Asked 1 time in 2026 · Unit 4

From the papers

  • “Explain ReLU activation function and discuss its advantages over sigmoid and tanh activation functions” (May 2026)

The short answer

ReLU (rectified linear unit) is the activation f(z) = max(0, z). Hidden layers use it more than sigmoid or tanh because it trains faster and does not saturate for positive inputs.

Write these points

Advantages of ReLU

  • No saturation for z > 0: the slope is exactly 1, so gradients do not shrink as they pass back through layers.
  • Cheap: one comparison, no exponent.
  • Sparse output: many units give 0, which saves computation and can help generalization.
  • Faster training: networks with ReLU often converge several times faster than with tanh.

Problems of sigmoid and tanh

  • Both flatten at large positive and negative z. The slope is near 0 there (the vanishing gradient).
  • The sigmoid slope is at most 0.25. Its output is not centred on zero.
  • Both need an exponent, which costs more time.

Weakness of ReLU

  • A unit with z always below 0 gives 0 and a zero gradient. It stops learning (a dead ReLU).
  • Fixes: Leaky ReLU (slope 0.01 for z < 0), PReLU, ELU and a smaller learning rate.
FunctionRangeMax slopeDead zone
Sigmoid0 to 10.25Both ends
tanh-1 to 11Both ends
ReLU0 to infinity1z < 0

Gradient after 5 layers.

If each sigmoid layer passes a slope of 0.25 (the best case), the gradient is 0.25^5 = 0.00098.

For active ReLU units the slope is 1 each time, so 1^5 = 1. The signal reaches the first layer.

Real-life example

Water passing through a pipe system. With sigmoid each joint leaks three quarters of the flow, so little reaches the last room. With ReLU an open joint passes everything. A closed joint passes nothing.

Figure: sigmoid, tanh and ReLU
Figure: sigmoid, tanh and ReLU

Same or opposite: ReLU and sigmoid

PointReLUSigmoidSame or opposite
Formulamax(0, z)1 / (1 + e^-z)Opposite
Slope for large positive z1Near 0Opposite
Non linearYesYesSame
Cost to computeVery cheapNeeds an exponentOpposite

Exam tip. Write the formula and plot all three on one set of axes. Give the 0.25^5 versus 1 number. Do not forget to name the dead ReLU weakness.

Back to the topic list

Q9. Guidelines for machine learning experiments

Asked 1 time in 2026 · Unit 5

From the papers

  • “Explain various guidelines for conducting Machine Learning experiments and discuss their significance in obtaining reliable results” (May 2026)

The short answer

Guidelines for ML experiments are a plan that makes a comparison of algorithms fair and repeatable. They run from stating the aim to reporting the conclusions with statistics.

Write these points

The steps

  1. Aim of the study: state what you want to know, for example which of two classifiers is better on this data.
  2. Response variable: choose what to measure, such as error rate, precision, recall, training time or memory.
  3. Factors and levels: list what you vary (algorithm, hyperparameters, data set) and the values tried.
  4. Experimental design: use replicated runs on the same data splits for every method. Randomise the order. Keep a separate test set.
  5. Perform the experiment: fix the random seeds, tune all methods with the same effort, save the logs.
  6. Statistical analysis: use a test (paired t test, McNemar) instead of looking at a single number.
  7. Conclusions and recommendations: state what is shown and its limits.

Why they matter

  • Without a fair design one method may look better by luck or because it was tuned more.
  • Repeated runs show the spread of the result, not just one lucky score.
  • Others can repeat the work.

Choosing the number of runs.

Two classifiers are compared with 10 fold cross validation. This gives 10 paired error values per method.

Mean difference 0.018 and standard deviation 0.0103 give a paired t value of 5.5. With 10 runs the test has 9 degrees of freedom.

One single split would have shown only one difference and no way to judge whether it is real.

Remember. The seven step list follows a common textbook scheme (Alpaydin). Other books group the steps a little differently.

Real-life example

Two cricket coaches claim their batter is better. A fair test uses the same pitch, the same bowlers and many innings, then compares averages. One innings on different pitches proves nothing. ML experiments need the same fairness.

Figure: steps of an ML experiment
Figure: steps of an ML experiment

Same or opposite: a single train and test split and repeated resampling

PointSingle splitRepeated resamplingSame or opposite
Number of scoresOneManyOpposite
Shows the spread of resultsNoYesOpposite
Uses held out test dataYesYesSame
CostLowHigherOpposite

Exam tip. Write the seven steps as a numbered list with a few words each. Close with the reason: fair, repeatable and statistically checked results.

Back to the topic list

Q10. Resampling techniques and classification metrics

Asked 1 time in 2026 · Unit 5

From the papers

  • “Describe resampling techniques and Discuss accuracy, precision, recall and F1-score metrics with suitable examples.” (May 2026)

The short answer

Resampling reuses one data set to make many training and test sets, so we can estimate how a model will do on new data. The usual ones are k fold cross validation, leave one out and the bootstrap.

Write these points

Resampling techniques

  • Hold out: one split, for example 80 percent train and 20 percent test. Simple but depends on the split.
  • K fold cross validation: split into k parts. Train on k - 1 parts and test on the left out part. Repeat k times and average. Usual k is 5 or 10.
  • Leave one out: k equals the number of examples. Almost unbiased but slow.
  • Bootstrap: draw n examples with replacement. About 63.2 percent of distinct examples appear. The rest (36.8 percent) form a test set.

Metrics from the confusion matrix

MetricFormulaQuestion it answers
Accuracy(TP + TN) / totalHow often is it right
PrecisionTP / (TP + FP)Of predicted positives, how many are right
RecallTP / (TP + FN)Of real positives, how many were found
F12PR / (P + R)Balance of precision and recall

A disease test on 100 people.

TP = 40, FN = 10, FP = 5, TN = 45.

Accuracy = 85 / 100 = 0.85. Precision = 40 / 45 = 0.889. Recall = 40 / 50 = 0.80. F1 = 0.842.

5 fold CV on 100 examples trains on 80 and tests on 20 each time. The chance an example is left out of a bootstrap sample of 100 is (1 - 1/100)^100 = 0.366.

Real-life example

If a teacher takes just one test, a lucky day can fool her. Taking five small tests and averaging, as k fold does, gives a more honest picture of a student. Precision and recall are like asking how many of the arrests were guilty and how many guilty people were caught.

Figure: 5 fold cross validation
Figure: 5 fold cross validation

Same or opposite: precision and recall

PointPrecisionRecallSame or opposite
Counts against itFalse positivesFalse negativesOpposite
Important whenA false alarm is costlyA miss is costlyOpposite
Both come from TPYesYesSame
Combined byF1F1Same

Exam tip. Name the three or four resampling methods with one line each. Draw the confusion matrix and use one set of numbers for all four metrics.

Back to the topic list

Start with the latest papers

Machine Learning for Data Science - May 2026

See all 1 papers →

Machine Learning for Data Science (CD-802-D) FAQs

What are the most important topics in Machine Learning for Data Science?

By how often they were asked in the papers on this site: Motivation for machine learning and generalization (1 times); VC dimension and PAC learning (1 times); Supervised learning: architecture and workflow (1 times); Regression, probabilistic classifiers and ensembles compared (1 times); Expectation Maximization (EM) algorithm (1 times).

How were these Machine Learning for Data Science important questions chosen?

Each topic was counted from the questions in the past papers listed on this site (2026). Repeated is the number of times the topic came. The counts come from keyword matching and the answers are not teacher-reviewed, so use them together with your syllabus.

Is there a PDF of Machine Learning for Data Science important questions with answers?

Yes. The Paperwala Imp Question & Answer PDF for Machine Learning for Data Science is free to download from this page.

The 10 most repeated topics of Machine Learning for Data Science (CD-802-D) for RGPV B.Tech CSE-DS semester 8, counted from the previous year papers on this site.