IT-802-A Machine Learning

Machine Learning (IT-802-A) Important Questions

RGPV · B.Tech · IT · Semester 8 · Current scheme · 2 papers (2023 to 2025)

  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 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 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. Learning paradigms, finite and infinite hypothesis spaces, factors that affect a model

Asked 2 times in 2023, 2025 · Unit 1

From the papers

  • “Explain the difference between supervised, unsupervised, semi-supervised and reinforcement learning. Provide practical examples for each paradigm.” (Jun 2025)
  • “What are the key factors affecting the performance of a machine learning model? Discuss their significance with examples.” (Jun 2025)
  • “Compare finite and infinite hypothesis spaces in machine learning. What are the implications of each on model complexity and generalization?” (Jun 2025)
  • “Explain with the examples of various learning paradigms, and the finite and infinite hypothesis spaces.” (May 2023)

The short answer

A learning paradigm is the way a machine learns from data: supervised (labelled examples), unsupervised (no labels), semi-supervised (a few labels) or reinforcement (rewards from actions). The hypothesis space H is the set of all functions a learner may choose. It is finite when it holds a countable, limited number of hypotheses and infinite when its parameters are real numbers.

Write these points

Learning paradigms

ParadigmDataPractical example
SupervisedInputs with correct outputsSpam filter, house price prediction
UnsupervisedInputs onlyCustomer segments, topic grouping
Semi-supervisedFew labels, many unlabelledPhoto tagging with a few named faces
ReinforcementRewards for actionsGame playing, robot walking

Finite and infinite hypothesis spaces

  • Finite: all conjunctions of 3 yes or no attributes (each attribute yes, no or ignore) give 3³ + 1 = 28 hypotheses. Sample bound: m ≥ (1/ε)(ln |H| + ln(1/δ)).
  • Infinite: all straight lines w·x + b = 0 in a plane. Size is measured by the VC dimension (3 for lines in 2-D).
  • Larger H: more complex, fits more, needs more data, risks overfitting. Smaller H: simpler, may underfit.

Factors that affect model performance

  1. Quantity and quality of data (noise, missing values).
  2. Representative and balanced data.
  3. Good features and scaling.
  4. Model choice and complexity (bias and variance).
  5. Hyperparameters and regularization.
  6. Proper evaluation: cross-validation, the right metric.

Size of a finite hypothesis space.

Attributes: Sky (sunny, rainy), Temp (warm, cold), Wind (strong, weak).

Each attribute in a hypothesis can be a value or "?" (any): 3 × 3 × 3 = 27, plus the empty hypothesis = 28.

With ε = 0.1 and δ = 0.05: m ≥ 10 × (ln 28 + ln 20) = 10 × (3.33 + 3.00) = 63.3.

So 64 examples are enough for this finite space.

Real-life example

A child learns fruit names from a parent pointing (supervised), sorts toys by shape alone (unsupervised) and learns to ride a cycle by falling and trying again (reinforcement).

Figure: learning paradigms
Figure: learning paradigms

Same or opposite: finite and infinite hypothesis spaces

PointFiniteInfiniteSame or opposite
SizeCountable number of hypothesesUnlimited (real valued parameters)Opposite
Bounded by a sample size formulaYesYesSame
Complexity measured byln |H|VC dimensionOpposite
ExampleConjunctions of yes or no attributesLines or planesOpposite

Exam tip. Give the four paradigm table with examples. Define finite and infinite H with one example each and their effect on complexity. List five performance factors.

Back to the topic list

Q2. Linear, multiple and logistic regression; cost function and SSE

Asked 2 times in 2023, 2025 · Unit 2

From the papers

  • “Differentiate between linear regression, multiple linear regression and logistic regression. Provide examples where each would be appropriate.” (Jun 2025)
  • “Solve the given problem using linear regression (time in months 48, 24, 36, 60, 72; sales 62, 30, 40, 50, 70) and find how well the regression equation fits the data. What sales would we expect for 40 months?” (May 2023)
  • “Explain linear and logistic regression. What are the advantages for the same?” (May 2023)
  • “What is the objective of convergence of cost function? Can we use it for the linear regression and how is it related to SSE?” (May 2023)

The short answer

Linear regression fits a straight line y = a + bx that predicts a number. Multiple linear regression uses several inputs, y = a + b₁x₁ + b₂x₂ + ... Logistic regression predicts a class probability with the sigmoid, P = 1 ÷ (1 + e^−z). All are trained by making a cost function as small as possible.

Write these points

Least squares fit

  • b = Σ(x − x̄)(y − ȳ) ÷ Σ(x − x̄)²; a = ȳ − b x̄.
  • Goodness of fit: R² = 1 − SSE ÷ SST, where SSE = Σ(y − ŷ)² and SST = Σ(y − ȳ)².
  • R² near 1 means the line explains most of the variation.

Cost function and convergence

  • Cost J = (1/2m) Σ(ŷ − y)², the mean of squared errors, so it is SSE ÷ 2m.
  • Gradient descent: θ = θ − α ∂J/∂θ; repeat until J stops falling: this is convergence.
  • For linear regression J is bowl shaped (convex), so gradient descent reaches the single minimum. Too large α overshoots; too small α is slow.
  • Logistic regression uses log loss instead, because squared error with a sigmoid is not convex.
PointLinearMultiple linearLogistic
InputsOneManyOne or many
OutputNumberNumberProbability, class
ExampleSales from timePrice from size, rooms, agePass or fail from hours
AdvantageSimple, easy to readUses many factorsGives probabilities, fast

May 2023 sales problem.

x (months) 48, 24, 36, 60, 72; y (tons) 62, 30, 40, 50, 70. x̄ = 48, ȳ = 50.4.

Σ(x − x̄)(y − ȳ) = 1080; Σ(x − x̄)² = 1440; b = 0.75; a = 50.4 − 0.75 × 48 = 14.4.

Line: y = 14.4 + 0.75x. For 40 months: 14.4 + 30 = 44.4 tons.

SSE = 233.2, SST = 1043.2, R² = 1 − 233.2 ÷ 1043.2 = 0.78. The line explains 78% of the variation: a good fit.

Real-life example

A shopkeeper who notices that each extra month on the shelf adds about three quarters of a ton of sales is doing linear regression in the head.

Figure: gradient descent
Figure: gradient descent

Same or opposite: linear and logistic regression

PointLinear regressionLogistic regressionSame or opposite
OutputAny real numberProbability 0 to 1Opposite
Uses a weighted sum of inputsYesYesSame
CostSquared errorLog lossOpposite
TaskRegressionClassificationOpposite

Exam tip. Write the formulas for b, a and R². Solve the sales table fully, then explain the cost function, gradient descent and SSE. End with the three-way comparison.

Back to the topic list

Q3. Support vector machine: linear classification, support vectors and the maximum margin

Asked 2 times in 2023, 2025 · Unit 2

From the papers

  • “Describe the key concepts behind Support Vector Machines (SVM) for linear classification. How is the margin optimized?” (Jun 2025)
  • “Classify the linear separable data using support vector machine. Also find the support vectors and the maximum margin hyperplane for the given points.” (May 2023)

The short answer

A support vector machine (SVM) separates two classes with the hyperplane w·x + b = 0 that has the widest margin. The closest points of each class lie on the margin lines w·x + b = ±1; they are the support vectors. The margin width is 2 ÷ ‖w‖.

Write these points

How the margin is optimized

  • Maximize 2 ÷ ‖w‖, which is the same as minimizing ½‖w‖².
  • Constraint: yᵢ(w·xᵢ + b) ≥ 1 for every training point.
  • Solved with Lagrange multipliers; only points with αᵢ > 0 (the support vectors) affect w = Σ αᵢ yᵢ xᵢ.
  • Soft margin: slack variables with penalty C allow a few errors on noisy data.
  • Kernel trick: for curved boundaries, a kernel (polynomial, RBF) works in a higher dimension without computing it.

May 2023 points.

Positive: (2, 1), (2, −1), (5, 1) and (−5, 1). The last one can only be (5, −1): a printed (−5, 1) lies among the negatives, so the data would not be separable. Negative: (1, 0), (0, 1), (−1, 0), (0, −1).

Closest pairs across the gap: (2, 1), (2, −1) and (1, 0). These are the support vectors.

Try w = (2, 0), b = −3: (2, ±1) gives 4 − 3 = 1; (1, 0) gives 2 − 3 = −1. Every other point gives a value beyond ±1.

Hyperplane 2x − 3 = 0, that is x = 1.5. Margin = 2 ÷ ‖w‖ = 2 ÷ 2 = 1.

Real-life example

Two rival teams stand in a field. The referee draws the chalk line exactly halfway between the nearest players of each side: those nearest players decide the line.

Figure: SVM margin and support vectors
Figure: SVM margin and support vectors

Same or opposite: hard margin and soft margin SVM

PointHard marginSoft marginSame or opposite
Errors allowedNoneSome, penalized by COpposite
Maximizes the marginYesYesSame
Works on noisy dataNoYesOpposite
Sensitivity to outliersHighLowerOpposite

Exam tip. Write the margin 2 ÷ ‖w‖, the optimization problem and the constraint. Name the support vectors, then solve the given points to x = 1.5 with margin 1.

Back to the topic list

Q4. Bayesian learning and the Naive Bayes classifier

Asked 2 times in 2023, 2025 · Unit 5

From the papers

  • “What are the assumptions of the Naive Bayes classifier? How do these assumptions simplify the computation of probabilities?” (Jun 2025)
  • “How will you define posterior and prior probability in Naive Bayes? For calculating performance of any classifier how does the noise affect the performance? Explain using example.” (May 2023)
  • “Explain Bayesian learning in probabilistic learning. Give suitable example.” (May 2023)
  • “A Covid-19 drug test has 1% false positives and 5% false negatives. 2% of those tested are taking drugs. Determine the probability that somebody who tests positive is actually taking drugs.” (May 2023)

The short answer

Bayesian learning updates a belief about a hypothesis h after seeing data D with Bayes' theorem: P(h | D) = P(D | h) P(h) ÷ P(D). P(h) is the prior (belief before data) and P(h | D) is the posterior (belief after data). The Naive Bayes classifier applies this to classes, assuming features are independent given the class.

Write these points

Naive Bayes

  • Choose the class c with the largest P(c) × Π P(xᵢ | c).
  • Assumption: features are conditionally independent given the class. Each feature also counts equally.
  • This turns one huge joint probability P(x₁, ..., xₙ | c) into n small ones, so a few counts per feature are enough.
  • Laplace smoothing (add 1 to counts) avoids a zero probability wiping out the product.

Effect of noise on a classifier

  • Label noise (wrong classes) shifts the estimated P(xᵢ | c), so accuracy falls.
  • Attribute noise blurs the difference between classes.
  • Naive Bayes is fairly tolerant: noise averages out over many counts. Measure with accuracy, precision and recall on clean test data.
  • Bayes optimal classifier: combines the predictions of all hypotheses weighted by their posteriors; no other method using the same data does better on average.

May 2023 drug test question.

P(D) = 0.02. False negative 5%, so P(+ | D) = 0.95. False positive 1%, so P(+ | ¬D) = 0.01.

P(+) = 0.95 × 0.02 + 0.01 × 0.98 = 0.0190 + 0.0098 = 0.0288.

P(D | +) = 0.0190 ÷ 0.0288 = 0.66.

Only 66% of people who test positive really take the drug, because so few people take it.

Real-life example

Hearing thunder, you raise your belief that it will rain. The belief before thunder is the prior; the belief after is the posterior.

Figure: Bayesian learning
Figure: Bayesian learning

Same or opposite: prior and posterior probability

PointPrior P(h)Posterior P(h | D)Same or opposite
WhenBefore seeing dataAfter seeing dataOpposite
Is a probability of the hypothesisYesYesSame
Uses the evidenceNoYesOpposite
In the drug example0.020.66Opposite

Exam tip. Write Bayes' theorem with prior and posterior named. Give the Naive Bayes rule, its independence assumption and why it simplifies counting. Solve the drug test numerically.

Back to the topic list

Q5. Bayesian belief networks

Asked 2 times in 2023, 2025 · Unit 5

From the papers

  • “Discuss the process of constructing a Bayesian Belief Network, including defining nodes, edges and conditional probabilities.” (Jun 2025)
  • “Consider the given Bayesian network of malaria and headache, P(M) = 0.03, P(H|M) = 0.6 and P(H|~M) = 0.2. Create the joint probability table.” (May 2023)

The short answer

A Bayesian belief network (BBN) is a directed acyclic graph: each node is a random variable, each edge shows direct influence (parent to child). Each node stores a conditional probability table (CPT) P(node | parents). The joint probability of all variables is the product of these tables: P(x₁, ..., xₙ) = Π P(xᵢ | parents(xᵢ)).

Write these points

Constructing a BBN

  1. Choose the variables (nodes) that matter for the problem.
  2. Order them from causes to effects.
  3. Add edges: for each variable, pick as parents the earlier variables that directly influence it.
  4. Fill the CPTs: from data or experts, P(node | each parent combination).
  5. Check: no cycles; every CPT row adds to 1.
  6. Use it for inference: P(cause | effect) by Bayes' rule.
  • Why it helps: with 5 yes or no variables the full joint table needs 31 numbers. A network where each node has at most 2 parents needs far fewer.
  • Uses: medical diagnosis, fault finding, spam filtering, risk analysis.

May 2023 malaria and headache network.

P(M) = 0.03, P(H | M) = 0.6, P(H | ¬M) = 0.2.

P(M, H) = 0.03 × 0.6 = 0.018. P(M, ¬H) = 0.03 × 0.4 = 0.012.

P(¬M, H) = 0.97 × 0.2 = 0.194. P(¬M, ¬H) = 0.97 × 0.8 = 0.776. Total = 1.000.

From the table: P(M | H) = 0.018 ÷ (0.018 + 0.194) = 0.085, so only 8.5% of headaches here are malaria.

Real-life example

A doctor's mental map, "malaria causes fever and headache; fever also comes from flu", is a belief network. The doctor reasons back from headache to the chance of malaria.

Figure: Bayesian network and joint table
Figure: Bayesian network and joint table

Same or opposite: Bayesian network and Naive Bayes

PointBayesian networkNaive BayesSame or opposite
DependenciesAny acyclic structureAll features depend only on the classOpposite
Uses conditional probabilitiesYesYesSame
Independence assumptionOnly where the graph saysStrong, everywhereOpposite
Building effortHigherVery lowOpposite

Exam tip. Define nodes, edges and CPTs, then list the construction steps. Draw the M → H network and fill its four-row joint table to a total of 1.

Back to the topic list

Q6. Hierarchical clustering: AGNES and DIANA

Asked 2 times in 2023, 2025 · Unit 4

From the papers

  • “Compare AGNES (Agglomerative Nesting) and DIANA (Divisive Analysis) hierarchical clustering methods. What are their advantages and limitations?” (Jun 2025)
  • “What do you understand by hierarchical clustering? Also explain AGNES, DIANA.” (May 2023)

The short answer

Hierarchical clustering builds a tree of clusters, shown as a dendrogram, instead of one flat split. AGNES (Agglomerative Nesting) works bottom up: each point starts alone and the closest clusters merge. DIANA (Divisive Analysis) works top down: all points start together and the cluster is split again and again.

Write these points

AGNES

  1. Put every point in its own cluster; compute the distance matrix.
  2. Merge the two closest clusters.
  3. Update distances with a linkage: single (nearest pair), complete (farthest pair), average.
  4. Repeat until one cluster is left; draw the dendrogram.

DIANA

  1. Start with all points in one cluster.
  2. In the cluster with the largest diameter, find the point with the largest average distance to the rest: it starts a splinter group.
  3. Move points that are closer to the splinter group than to the rest.
  4. Repeat until every point stands alone.
PointAGNESDIANA
AdvantagesSimple, common, any linkage, no k neededFinds large clear splits first; good at the top levels
LimitationsO(n²) memory, a merge cannot be undone, sensitive to noiseCostly: many ways to split, a split cannot be undone

AGNES on five points (single linkage).

Points on a line: 1, 2, 6, 7, 15.

Merge 1 and 2 (distance 1), then 6 and 7 (distance 1).

{1, 2} and {6, 7} are 4 apart; 15 is 8 from 7. Merge {1, 2, 6, 7} at 4.

Finally add 15 at 8. Cutting the dendrogram at 5 gives two clusters: {1, 2, 6, 7} and {15}.

Real-life example

A family tree read from children up to the great-grandparent is AGNES. Read from the great-grandparent down to the children it is DIANA.

Figure: AGNES on five points
Figure: AGNES on five points

Same or opposite: AGNES and DIANA

PointAGNESDIANASame or opposite
DirectionBottom up: mergeTop down: splitOpposite
Gives a dendrogramYesYesSame
Startn single clustersOne clusterOpposite
CostLowerHigherOpposite

Exam tip. Define hierarchical clustering and the dendrogram. Write the steps of AGNES and DIANA, the linkage types and the table of advantages and limitations. Work one small example.

Back to the topic list

Q7. PCA, locally linear embedding and dimensionality reduction

Asked 2 times in 2023, 2025 · Unit 4

From the papers

  • “Compare PCA and Locally Linear Embedding (LLE). When would you prefer LLE over PCA?” (Jun 2025)
  • “What is Principal Component Analysis (PCA)? Explain using an example. Also explain the concept of dimensionality reduction.” (May 2023)

The short answer

Dimensionality reduction reduces the number of features while keeping the useful information, which speeds up learning and fights the curse of dimensionality. PCA projects data onto the straight directions of largest variance. LLE (locally linear embedding) keeps each point's relation to its near neighbours, so it can unroll curved data.

Write these points

PCA steps

  1. Centre (and scale) the data.
  2. Compute the covariance matrix.
  3. Find its eigenvectors (principal components) and eigenvalues.
  4. Keep the top k components by eigenvalue (for example 95% of variance).
  5. Project the data onto them.

LLE steps

  1. For each point find its k nearest neighbours.
  2. Find weights that rebuild each point from its neighbours (weights add to 1).
  3. Find low dimensional points that keep the same weights.
  • Prefer LLE when data lie on a curved surface (Swiss roll, face poses) and local shape matters.
  • Prefer PCA for roughly linear data, for speed, for new points and for compression.

PCA on two features.

Height and weight of students are strongly correlated; covariance eigenvalues 9.5 and 0.5.

PC1 carries 9.5 ÷ 10 = 95% of the variance; PC2 only 5%.

Keep PC1 alone: two features become one "body size" score.

Half the data size, 95% of the information kept.

Real-life example

A map of a rolled carpet seen from above (PCA) hides the pattern; unrolling the carpet first (LLE) shows it flat.

Figure: principal components
Figure: principal components

Same or opposite: PCA and LLE

PointPCALLESame or opposite
TypeLinear projectionNon-linear manifold learningOpposite
Reduces dimensionsYesYesSame
KeepsGlobal varianceLocal neighbourhoodsOpposite
Speed and new pointsFast, easySlower, harderOpposite

Exam tip. Define dimensionality reduction and its benefits. Write the PCA and LLE steps, say when LLE is better and add a small PCA example with explained variance.

Back to the topic list

Q8. Mining frequent patterns: frequent itemsets and Apriori

Asked 2 times in 2023, 2025 · Unit 5

From the papers

  • “What is frequent pattern mining, and why is it important in fields like market basket analysis?” (Jun 2025)
  • “State the k frequent itemset mining algorithm and solve the given transactions using k = 3 (min_supp = 2).” (May 2023)

The short answer

Frequent pattern mining finds item sets that appear together in many transactions. An itemset is frequent when its support (number of transactions containing it) is at least min_supp. The Apriori algorithm finds frequent k-itemsets level by level. This is the base of market basket analysis: which products are bought together.

Write these points

Apriori algorithm

  1. Count every single item; keep those with support ≥ min_supp (L₁).
  2. Join Lₖ₋₁ with itself to make candidate k-itemsets Cₖ.
  3. Prune: drop any candidate with an infrequent subset (Apriori property: every subset of a frequent itemset is frequent).
  4. Scan the data to count Cₖ; keep those with enough support (Lₖ).
  5. Repeat until no new frequent itemsets; then build rules with confidence = support(A ∪ B) ÷ support(A).
  • Why it matters: shelf placement, combo offers, recommendations ("customers also bought"), stock planning.

May 2023 transactions, min_supp = 2, up to k = 3.

Nine baskets. L₁: Bread 6, Butter 7, Milk 6, Coke 2, Jam 2.

L₂: {Bread, Butter} 4, {Bread, Milk} 4, {Butter, Milk} 4, {Bread, Jam} 2, {Butter, Coke} 2, {Butter, Jam} 2.

C₃ after pruning: {Bread, Butter, Milk} and {Bread, Butter, Jam}. Counts: 2 and 2.

L₃ = {Bread, Butter, Milk} and {Bread, Butter, Jam}. Rule Jam → Bread, Butter has confidence 2 ÷ 2 = 100%.

Real-life example

A supermarket notices that bread, butter and jam often leave in the same bag, so it places jam next to bread. That is frequent pattern mining.

Figure: Apriori
Figure: Apriori

Same or opposite: support and confidence

PointSupportConfidenceSame or opposite
MeasuresHow often items appear togetherHow often the rule holds when A appearsOpposite
Used to judge rulesYesYesSame
Formulacount(A ∪ B)support(A ∪ B) ÷ support(A)Opposite
Applies toItemsetsRules A → BOpposite

Exam tip. Define support, frequent itemset and the Apriori property. Write the join, prune and count steps. Build L₁, L₂ and L₃ in tables for the given data.

Back to the topic list

Q9. K-means clustering and distance measures

Asked 1 time in 2023 · Unit 4

From the papers

  • “Cluster the eight points A1(2,10), A2(2,5), A3(8,4), B1(5,8), B2(7,5), B3(6,4), C1(1,2), C2(4,9) into three clusters with k-means, starting from A1, B1 and C1. Show the centres after the first round and the final three clusters.” (May 2023)
  • “Assuming the database given in the table, find the distance using the Euclidean distance method with respect to cluster center (0.30, 0.20).” (May 2023)

The short answer

K-means splits data into k clusters. Each point joins its nearest centre and each centre moves to the mean of its points; the two steps repeat until nothing changes. Distance is usually Euclidean: d = √((x₁ − x₂)² + (y₁ − y₂)²).

Write these points

Algorithm

  1. Choose k and the starting centres.
  2. Assign every point to the nearest centre.
  3. Recompute each centre as the mean of its points.
  4. Repeat steps 2 and 3 until the clusters stop changing.
  • Fast and simple, O(n k t).
  • Needs k in advance; sensitive to starting centres and outliers; finds round clusters.
  • K-modes is the version for categorical data: modes instead of means, mismatch count instead of distance.

May 2023 eight points, starting centres A1, B1, C1.

Round 1: A1 alone; A3, B1, B2, B3, C2 nearest to B1; A2, C1 nearest to C1. New centres (2, 10), (6, 6), (1.5, 3.5).

Round 2: C2 moves to cluster 1; centres (3, 9.5), (6.5, 5.25), (1.5, 3.5).

Round 3: B1 moves to cluster 1. Final clusters {A1, B1, C2}, {A3, B2, B3}, {A2, C1} with centres (3.67, 9), (7, 4.33), (1.5, 3.5).

Second question, distances to (0.30, 0.20): C1 0.345, C2 0.197, C3 0.130, C4 0.041, C5 0.304, C6 0.180. C4 is the closest.

Real-life example

Three new tea stalls on a campus keep moving to the middle of their own customers until each stall serves the students nearest to it. That is k-means.

Figure: k-means final clusters
Figure: k-means final clusters

Same or opposite: k-means and k-modes

Pointk-meansk-modesSame or opposite
DataNumericCategoricalOpposite
Needs k in advanceYesYesSame
CentreMeanModeOpposite
DistanceEuclideanNumber of mismatchesOpposite

Exam tip. Write the four steps and the Euclidean formula. Show each round of the given problem in a table with new centres. List the limits of k-means.

Back to the topic list

Q10. Ensemble learning: model combination schemes, bagging and stacking

Asked 1 time in 2025 · Unit 3

From the papers

  • “Discuss the role of meta-learners in stacking and how they contribute to the overall model performance.” (Jun 2025)
  • “What is the bagging technique in ensemble learning, and how does it reduce variance in predictions?” (Jun 2025)
  • “Compare and contrast the different model combination schemes used in ensemble learning.” (Jun 2025)

The short answer

Ensemble learning combines several models so the group is more accurate than any one. Model combination schemes decide how: voting, averaging, bagging, boosting, stacking and error-correcting output codes (ECOC).

Write these points

Combination schemes

SchemeHow models are combinedExample
VotingMajority class (or average probability)Three classifiers vote
BaggingSame model on bootstrap samples, then vote or averageRandom forest
BoostingModels in sequence, each fixing earlier errors; weighted voteAdaBoost
StackingA meta-learner learns how to combine base predictionsLogistic regression on top of tree, SVM, KNN
ECOCEach class gets a binary code word; one classifier per bit; nearest code winsDigit recognition with 10 classes

Bagging reduces variance

  • Each model sees a different bootstrap sample, so their errors differ.
  • Averaging n models with independent errors divides the variance by about n.
  • Works best with unstable, high variance models such as deep trees.

Meta-learner in stacking

  • Base models are trained; their out-of-fold predictions become new features.
  • The meta-learner learns which base model to trust in which case.
  • Result is usually better than the best single model.

Variance drop by bagging.

One deep tree has prediction variance 16.

Bag 4 trees whose errors are independent: variance ≈ 16 ÷ 4 = 4.

Standard deviation falls from 4 to 2.

Real trees are partly correlated, so the drop is smaller; random feature choice (random forest) lowers the correlation.

Real-life example

A quiz team answers better than one member: each person knows different things. The captain who learns whom to trust on which topic is the meta-learner.

Figure: bagging and boosting
Figure: bagging and boosting

Same or opposite: bagging and stacking

PointBaggingStackingSame or opposite
Base modelsSame typeDifferent typesOpposite
Combines several modelsYesYesSame
CombinerFixed vote or averageLearned meta-modelOpposite
Main gainLower varianceBetter use of different strengthsOpposite

Exam tip. Define ensemble learning and give the combination scheme table. Explain why bagging lowers variance and how the stacking meta-learner works.

Back to the topic list

Q11. Gaussian mixture models and expectation maximization

Asked 1 time in 2025 · Unit 4

From the papers

  • “Describe Gaussian Mixture Models (GMM) and how they model data clusters as probabilistic distributions. What makes GMMs suitable for overlapping clusters?” (Jun 2025)

The short answer

A Gaussian mixture model (GMM) says each cluster is a Gaussian (normal) distribution with its own mean μₖ, covariance Σₖ and weight πₖ: p(x) = Σ πₖ N(x | μₖ, Σₖ). Every point gets a probability of belonging to each cluster, so GMMs handle overlapping clusters. Parameters are learned by expectation maximization (EM).

Write these points

EM for a GMM

  1. Initialize μ, Σ, π (for example from k-means).
  2. E step: responsibility rᵢₖ = πₖ N(xᵢ | μₖ, Σₖ) ÷ Σⱼ πⱼ N(xᵢ | μⱼ, Σⱼ).
  3. M step: πₖ = mean of rᵢₖ; μₖ = weighted mean of points; Σₖ = weighted spread.
  4. Repeat until the log-likelihood stops rising.

Why GMMs suit overlapping clusters

  • Soft assignment: a point in the overlap can be 60% one cluster and 40% another.
  • Covariance lets clusters be stretched ellipses of different sizes.
  • Gives a density, so it can also flag unlikely points as outliers.

Responsibility of one point.

Two clusters with equal weight. For x = 165 cm: N(x | girls) = 0.04, N(x | boys) = 0.02.

r(girls) = 0.5 × 0.04 ÷ (0.5 × 0.04 + 0.5 × 0.02) = 0.02 ÷ 0.03 = 0.67.

r(boys) = 0.33.

The point counts two thirds towards the girls' mean and one third towards the boys' mean in the M step.

Real-life example

Heights in a mixed class form two overlapping bell curves. A GMM finds both bells and gives each student a chance of belonging to each.

Figure: EM for a GMM
Figure: EM for a GMM

Same or opposite: GMM and k-means

PointGMMk-meansSame or opposite
AssignmentSoft (probabilities)HardOpposite
Needs the number of clustersYesYesSame
Cluster shapeEllipses, any sizeRoundOpposite
Overlapping clustersHandledPoorOpposite

Exam tip. Write the mixture formula, the E and M steps and the reasons GMMs handle overlap. Add a responsibility calculation.

Back to the topic list

Q12. Self-organizing map

Asked 1 time in 2023 · Unit 4

From the papers

  • “Explain and elaborate Self-Organizing Map. Justify your answer with neat diagram and example.” (May 2023)

The short answer

A self-organizing map (SOM), or Kohonen map, is an unsupervised neural network that maps high dimensional data onto a 2-D grid of neurons. Neurons compete; the winner and its grid neighbours move towards the input. Similar inputs end up on nearby neurons, so the map keeps the topology of the data.

Write these points

Algorithm

  1. Give each grid neuron a random weight vector of the input size.
  2. Pick an input x.
  3. Competition: the best matching unit (BMU) is the neuron with the smallest ‖x − w‖.
  4. Cooperation: neighbours of the BMU are found by a neighbourhood function h (large at first, shrinking over time).
  5. Adaptation: w = w + η h (x − w) for the BMU and its neighbours.
  6. Repeat for many inputs while η and the neighbourhood shrink.
  • Uses: visualizing high dimensional data, customer segmentation, document maps, colour quantization.
  • Differs from k-means: neighbouring neurons are linked, so the map shows which clusters lie close.

One SOM update.

Input x = (1, 0). BMU weight w = (0.6, 0.2), learning rate η = 0.5, h = 1 for the BMU.

w(new) = (0.6, 0.2) + 0.5 × ((1, 0) − (0.6, 0.2)) = (0.6, 0.2) + (0.2, −0.1) = (0.8, 0.1).

A neighbour with h = 0.5 moves half as far.

After many inputs, red-like colours gather in one corner of the map and blue-like in another.

Real-life example

In a new hostel, students with similar interests drift to neighbouring rooms over the first weeks. After a while the corridor itself becomes a map of interests.

Figure: self-organizing map
Figure: self-organizing map

Same or opposite: SOM and k-means

PointSOMk-meansSame or opposite
StructureGrid with neighboursIndependent centresOpposite
UnsupervisedYesYesSame
UpdateWinner and neighboursOnly the centreOpposite
OutputTopology preserving mapFlat clustersOpposite

Exam tip. Draw the input layer fully connected to a 2-D grid. Write competition, cooperation and adaptation with the update formula. Show one numeric update.

Back to the topic list

Q13. Decision trees: ID3, entropy and information gain

Asked 1 time in 2025 · Unit 2

From the papers

  • “Explain the ID3 algorithm for building decision trees. How does it use entropy and information gain?” (Jun 2025)

The short answer

ID3 (Iterative Dichotomiser 3) builds a decision tree top down. At each node it splits on the attribute with the highest information gain, that is the largest drop in entropy. Entropy measures impurity: H(S) = −Σ pᵢ log₂ pᵢ.

Write these points

Algorithm

  1. Compute the entropy of the whole data set S.
  2. For each attribute A: Gain(S, A) = H(S) − Σ (|Sᵥ| ÷ |S|) H(Sᵥ) over its values v.
  3. Split on the attribute with the largest gain.
  4. Repeat on each branch with the remaining attributes.
  5. Stop when a node is pure or no attributes are left (majority class).
  • Handles categorical attributes; prefers attributes with many values (C4.5 fixes this with gain ratio).
  • No pruning in basic ID3, so it can overfit. CART uses the Gini index and binary splits and also does regression.

Gain of one attribute.

14 days: 9 play, 5 no. H(S) = −(9/14) log₂(9/14) − (5/14) log₂(5/14) = 0.940.

Wind: weak 8 days (6 yes, 2 no), H = 0.811; strong 6 days (3 yes, 3 no), H = 1.0.

Gain(Wind) = 0.940 − (8/14 × 0.811 + 6/14 × 1.0) = 0.940 − 0.892 = 0.048.

Outlook gives 0.246, so ID3 puts Outlook at the root.

Real-life example

In a 20 questions game, the best first question splits the possibilities most evenly. ID3 picks the attribute that removes the most doubt in the same way.

Figure: ID3
Figure: ID3

Same or opposite: ID3 and CART

PointID3CARTSame or opposite
Split measureInformation gainGini indexOpposite
Builds a decision tree top downYesYesSame
Split typeMany branchesBinaryOpposite
RegressionNoYesOpposite

Exam tip. Write the entropy and gain formulas, the ID3 steps and the stopping rule. Compute gain for one attribute and name the root.

Back to the topic list

Q14. K-nearest neighbours classification

Asked 1 time in 2023 · Unit 2

From the papers

  • “Apply an appropriate classification algorithm on the data table and classify the class of a product with previous price 42 and new price 48.” (May 2023)

The short answer

K-nearest neighbours (KNN) classifies a new item by the majority class of its k closest training items. It is supervised, instance based and lazy: there is no training step, only distance computation at prediction time.

Write these points

Steps

  1. Choose k (odd, often 3) and a distance (Euclidean).
  2. Compute the distance from the new item to every training item.
  3. Take the k nearest.
  4. Majority vote gives the class (for regression, average the values).
  • Scale features first; choose k by cross-validation.
  • Small k overfits noise; large k blurs class borders.
  • Slow on big data; suffers in high dimensions.

May 2023 product: previous price 42, new price 48.

Product 1 (43, 54): √(1 + 36) = 6.08, Sell.

Product 2 (52, 61): √(100 + 169) = 16.40, Sell. Product 3 (38, 40): √(16 + 64) = 8.94, Accumulate.

Product 4 (29, 21): √(169 + 729) = 29.97, Accumulate.

With k = 3 the nearest are Products 1, 3, 2: Sell 2, Accumulate 1. The new product is Sell.

Real-life example

To guess the rent of a new flat, a broker looks at the three most similar flats nearby and goes with what they fetch. That is KNN.

Figure: KNN
Figure: KNN

Same or opposite: KNN and decision tree

PointKNNDecision treeSame or opposite
LearningLazy: stores dataEager: builds a treeOpposite
SupervisedYesYesSame
Prediction timeSlowFastOpposite
Needs scalingYesNoOpposite

Exam tip. State why KNN fits the product table. Compute all four distances in a table, pick k = 3 and vote. Mention scaling and the choice of k.

Back to the topic list

Q15. Multilayer perceptron and activation functions

Asked 1 time in 2025 · Unit 2

From the papers

  • “Explain the role of activation functions in a multilayer perceptron. How do they enable the learning of nonlinear patterns?” (Jun 2025)

The short answer

A multilayer perceptron (MLP) has an input layer, one or more hidden layers and an output layer. Each neuron computes a weighted sum and passes it through an activation function. A non-linear activation is what lets the network learn curved, non-linear patterns.

Write these points

Role of activation functions

  • Without them, layers of weighted sums collapse into one linear map: W₂(W₁x) = Wx, so XOR could never be learned.
  • Non-linear activations bend the decision boundary; stacked layers combine the bends into any shape.
  • They must be differentiable (almost everywhere) so backpropagation can compute gradients.
  • Output layer choice follows the task: sigmoid for two classes, softmax for many, none (linear) for regression.
FunctionFormulaRangeUse
Sigmoid1 ÷ (1 + e^−x)0 to 1Binary output
Tanh(eˣ − e^−x) ÷ (eˣ + e^−x)−1 to 1Hidden layers (older nets)
ReLUmax(0, x)0 to ∞Hidden layers today; fast, less vanishing gradient
Softmaxeˣⁱ ÷ Σ eˣʲ0 to 1, sums to 1Multi-class output

XOR needs a non-linear hidden layer.

Hidden neuron h₁ = step(x₁ + x₂ − 0.5) acts as OR; h₂ = step(x₁ + x₂ − 1.5) acts as AND.

Output y = step(h₁ − h₂ − 0.5).

Inputs (0,0) → 0; (0,1) → 1; (1,0) → 1; (1,1) → h₁ = 1, h₂ = 1, y = 0.

No single straight line can do this; the non-linear step in the hidden layer makes it possible.

Real-life example

A plain ruler can only draw straight lines. Joining short ruler pieces at angles (the activations) lets you trace any curve.

Figure: multilayer perceptron
Figure: multilayer perceptron

Same or opposite: sigmoid and ReLU

PointSigmoidReLUSame or opposite
Range0 to 10 to ∞Opposite
Non-linearYesYesSame
Vanishing gradientCommonRare for positive inputsOpposite
SpeedSlowerVery fastOpposite

Exam tip. Draw the MLP. Explain why non-linear activations are needed with the W₂W₁ = W argument and XOR. Give the activation table.

Back to the topic list

Machine Learning in Information Technology

Machine Learning is a Semester 8 subject in Information Technology, under the paper code IT-802-A. Computer Science and Engineering studies the same subject in Semester 6 as CS-601, and its full unit-wise brief is on the Computer Science and Engineering page. In Semester 8 of Information Technology you study it along with Information Security, Blockchain Technology and Parallel Computing.

Machine Learning is a Semester 8 option in IT, two semesters after CSE. Artificial Intelligence in Semester 5 and Data Mining in Semester 6 come before it, and Units 2 to 4 (neural networks) are the heavy part.

We hold 2 previous year papers for Machine Learning in Information Technology, from 2023 to 2025. The papers list opens each one, newest first.

Machine Learning units at a glance

  1. Introduction to machine learning
  2. Neural networks and training
  3. Convolutional neural networks
  4. Recurrent neural networks and reinforcement learning
  5. Support vector machines and applications

The unit list follows the RGPV scheme and syllabus, B.Tech Computer Science and Engineering, Semester 6 (AICTE flexible curriculum, w.e.f. Jan 2020). Check your own branch's scheme document if a unit differs. For the topics inside each unit, open the Machine Learning notes.

Start with the latest papers

Machine Learning - Jun 2025

Machine Learning - May 2023

See all 2 papers →

Machine Learning (IT-802-A) FAQs

What are the most important topics in Machine Learning?

By how often they were asked in the papers on this site: Learning paradigms, finite and infinite hypothesis spaces, factors that affect a model (2 times); Linear, multiple and logistic regression; cost function and SSE (2 times); Support vector machine: linear classification, support vectors and the maximum margin (2 times); Bayesian learning and the Naive Bayes classifier (2 times); Bayesian belief networks (2 times).

How were these Machine Learning important questions chosen?

Each topic was counted from the questions in the past papers listed on this site (2023-2025). 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 important questions with answers?

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

The 15 most repeated topics of Machine Learning (IT-802-A) for RGPV B.Tech IT semester 8, counted from the previous year papers on this site.