2026 question paper
Machine Learning
28 questions
1(a). A model has 98% training accuracy and 72% test accuracy. Which of the following is the most likely explanation? (i) High bias (ii) Overfitting (iii) Underfitting (iv) Insufficient features20262m
Module 1: Introduction
View this question on its own page →A model has 98% training accuracy and 72% test accuracy. Which of the following is the most likely explanation? (i) High bias (ii) Overfitting (iii) Underfitting (iv) Insufficient features
Worked SolutionAnswer: (ii) Overfitting
Training accuracy is high (98%) but test accuracy is much lower (72%), indicating the model fits training-specific patterns and generalizes poorly. This is a typical high-variance/overfitting pattern.
1(b). Which statement about hypothesis space is correct? (i) A larger hypothesis space always gives better generalization (ii) Hypothesis space is unrelated to inductive bias (iii) A smaller hypothesis space always gives lower training error (iv) A larger hypothesis space can increase the risk of overfitting20262m
Module 1: Introduction
View this question on its own page →Which statement about hypothesis space is correct? (i) A larger hypothesis space always gives better generalization (ii) Hypothesis space is unrelated to inductive bias (iii) A smaller hypothesis space always gives lower training error (iv) A larger hypothesis space can increase the risk of overfitting
Worked SolutionAnswer: (iv) A larger hypothesis space can increase the risk of overfitting
A larger hypothesis space can represent more patterns, lowering training error, but may also fit noise. Generalization depends on data, regularization, model capacity and inductive bias; larger is not automatically better.
1(c). Ridge regression primarily uses which penalty? (i) L0 (ii) L2 (iii) L1 (iv) Entropy20262m
Module 2: Statistical Decision Theory and Bayesian Learning
View this question on its own page →Ridge regression primarily uses which penalty? (i) L0 (ii) L2 (iii) L1 (iv) Entropy
Worked SolutionAnswer: (ii) L2
Ridge regression minimizes squared error plus an L2 penalty: (\sum_i(y_i-\hat y_i)^2 + \lambda\sum_j\beta_j^2). It shrinks coefficients toward zero but usually does not set them exactly to zero.
1(d). During backpropagation, the main purpose of propagating the error backward is to (i) Generate new training data (ii) Normalize the input (iii) Remove hidden layers (iv) Compute gradients for updating network weights20262m
Module 3: Linear Classification and Advanced Methods
View this question on its own page →During backpropagation, the main purpose of propagating the error backward is to (i) Generate new training data (ii) Normalize the input (iii) Remove hidden layers (iv) Compute gradients for updating network weights
Worked SolutionAnswer: (iv) Compute gradients for updating network weights
Backpropagation applies the chain rule from the output layer backward to calculate loss gradients with respect to weights and biases. An optimizer uses these gradients to update the parameters.
1(e). LDA generally assumes that different classes have (i) Different covariance matrices (ii) No covariance (iii) The same covariance matrix (iv) Identical means20262m
Module 3: Linear Classification and Advanced Methods
View this question on its own page →LDA generally assumes that different classes have (i) Different covariance matrices (ii) No covariance (iii) The same covariance matrix (iv) Identical means
Worked SolutionAnswer: (iii) The same covariance matrix
Classical Linear Discriminant Analysis assumes class-conditional Gaussian distributions with a shared covariance matrix, allowing linear decision boundaries. Different class means and prior probabilities may still apply.
1(f). If the p-value is smaller than the significance level α, we generally (i) Reject H0 (ii) Accept H0 (iii) Increase α automatically (iv) Reject H120262m
Module 4: Hypothesis Testing and Ensemble Methods
View this question on its own page →If the p-value is smaller than the significance level α, we generally (i) Reject H0 (ii) Accept H0 (iii) Increase α automatically (iv) Reject H1
Worked SolutionAnswer: (i) Reject (H_0)
When the p-value is below the chosen significance level (\alpha), the observed data would be sufficiently unlikely under the null hypothesis, so we reject (H_0). This does not prove the alternative hypothesis with certainty.
1(g). AdaBoost primarily focuses subsequent learners on (i) Randomly selected features only (ii) Previously misclassified or difficult observations (iii) Only correctly classified observations (iv) Unlabelled observations20262m
Module 4: Hypothesis Testing and Ensemble Methods
View this question on its own page →AdaBoost primarily focuses subsequent learners on (i) Randomly selected features only (ii) Previously misclassified or difficult observations (iii) Only correctly classified observations (iv) Unlabelled observations
Worked SolutionAnswer: (ii) Previously misclassified or difficult observations
AdaBoost increases the weights of incorrectly classified training examples so subsequent weak learners pay more attention to them. Learners are combined using weights based on their performance.
1(h). K-medoids differs from K-means because K-medoids uses (i) An actual data point as the cluster representative (ii) The mean of all clusters (iii) A randomly generated point (iv) Eigenvectors20262m
Module 5: Clustering
View this question on its own page →K-medoids differs from K-means because K-medoids uses (i) An actual data point as the cluster representative (ii) The mean of all clusters (iii) A randomly generated point (iv) Eigenvectors
Worked SolutionAnswer: (i) An actual data point as the cluster representative
K-medoids selects an observed data point (a medoid) as each cluster's representative. K-means uses the arithmetic mean, which need not be an actual data point.
1(i). A dataset contains two elongated, non-spherical clusters. Which method is generally more appropriate than standard K-means? (i) K-means (ii) Linear regression (iii) Density-based clustering (iv) Naive Bayes20262m
Module 5: Clustering
View this question on its own page →A dataset contains two elongated, non-spherical clusters. Which method is generally more appropriate than standard K-means? (i) K-means (ii) Linear regression (iii) Density-based clustering (iv) Naive Bayes
Worked SolutionAnswer: (iii) Density-based clustering
Density-based methods such as DBSCAN can discover irregularly shaped clusters and label sparse points as noise. K-means works best for compact, roughly spherical clusters under Euclidean distance.
1(j). In the E-step of EM, we primarily (i) Update model parameters (ii) Remove missing data (iii) Estimate the latent-variable responsibilities (iv) Calculate classification accuracy20262m
Module 6: Advanced Topics
View this question on its own page →In the E-step of EM, we primarily (i) Update model parameters (ii) Remove missing data (iii) Estimate the latent-variable responsibilities (iv) Calculate classification accuracy
Worked SolutionAnswer: (iii) Estimate the latent-variable responsibilities
In the Expectation step, EM computes the expected latent-variable assignments/responsibilities using current parameters. The Maximization step then updates parameters to maximize the expected complete-data log-likelihood.
- Install PocketlyBudget App•POCKETLY
Pocketly on Android
Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.
2(a). Explain the bias-variance trade-off and discuss how model complexity affects underfitting and overfitting.20267m
Module 1: Introduction
View this question on its own page →Explain the bias-variance trade-off and discuss how model complexity affects underfitting and overfitting.
Worked SolutionBias–variance trade-off
Bias is error from overly restrictive assumptions; variance is sensitivity to the particular training sample. Expected prediction error can be viewed as irreducible noise plus squared bias plus variance.
- Underfitting: model too simple; high bias; poor training and test performance.
- Overfitting: model too complex; low training error but high variance and poor test performance.
- Balanced model: captures real structure while generalizing to unseen data.
Increasing complexity often lowers training error but may eventually raise test error. Use cross-validation, regularization, more representative data, feature selection or early stopping to choose complexity.
MermaidDiagramRendering diagram…2(b). Explain the basic concepts of Reinforcement Learning. Also explain the exploration-exploitation trade-off and the role of the ε-greedy strategy.20267m
Module 6: Advanced Topics
View this question on its own page →Explain the basic concepts of Reinforcement Learning. Also explain the exploration-exploitation trade-off and the role of the ε-greedy strategy.
Worked SolutionReinforcement Learning and ε-greedy
Reinforcement Learning (RL) trains an agent to choose actions in an environment. The environment returns a reward and next state. The goal is to maximize cumulative discounted reward. Key terms: state (s), action (a), reward (r), policy (\pi), value function and learning rate.
Exploration tries actions to learn their outcomes; exploitation chooses the currently best-known action. Too much exploration wastes reward; too little may miss better actions.
With ε-greedy, choose a random action with probability (\epsilon), and the best estimated action with probability (1-\epsilon). ε may decay as learning progresses.
MermaidDiagramRendering diagram…3(a). A test is applied to 1000 patients: 200 are sick, and 800 are healthy. It correctly detects 160 sick patients, while 40 healthy patients test positive. Construct the confusion matrix and calculate accuracy, precision, recall, and F1-score.20267m
Module 1: Introduction
View this question on its own page →A test is applied to 1000 patients: 200 are sick, and 800 are healthy. It correctly detects 160 sick patients, while 40 healthy patients test positive. Construct the confusion matrix and calculate accuracy, precision, recall, and F1-score.
Worked SolutionConfusion matrix and metrics
There are 200 sick patients and 800 healthy patients. True positives = 160; false negatives = 200 − 160 = 40. False positives = 40; true negatives = 800 − 40 = 760.
Actual / Predicted Positive Negative Total Sick TP = 160 FN = 40 200 Healthy FP = 40 TN = 760 800 Total 200 800 1000 - Accuracy = ((TP+TN)/N=(160+760)/1000=\mathbf{92%})
- Precision = (TP/(TP+FP)=160/200=\mathbf{80%})
- Recall = (TP/(TP+FN)=160/200=\mathbf{80%})
- F1 = (2PR/(P+R)=\mathbf{80%})
Accuracy measures overall correctness; precision measures reliability of positive predictions; recall measures how many actual sick patients were detected.
3(b). The following data shows the hours studied (X) and marks obtained (Y) by 6 students: X = 2, 3, 5, 6, 8, 9; Y = 50, 55, 65, 70, 80, 85. Find the regression equation of Y on X and predict the marks for a student who studies 7 hours.20267m
Module 2: Statistical Decision Theory and Bayesian Learning
View this question on its own page →The following data shows the hours studied (X) and marks obtained (Y) by 6 students: X = 2, 3, 5, 6, 8, 9; Y = 50, 55, 65, 70, 80, 85. Find the regression equation of Y on X and predict the marks for a student who studies 7 hours.
Worked SolutionRegression of marks on study hours
Data: (X=(2,3,5,6,8,9)), (Y=(50,55,65,70,80,85)). The points lie exactly on a straight line: every additional study hour corresponds to 5 additional marks.
The least-squares line is (\hat Y=a+bX), with slope (b=S_{xy}/S_{xx}=5) and intercept (a=\bar Y-b\bar X=40).
Regression equation: (\boxed{\hat Y=40+5X})
For (X=7): (\hat Y=40+5(7)=\boxed{75}) marks.
SVGVector Architecture Diagram (SVG)4(a). Explain Principal Component Analysis. Describe the steps involved in transforming the original features into principal components.20267m
Module 2: Statistical Decision Theory and Bayesian Learning
View this question on its own page →Explain Principal Component Analysis. Describe the steps involved in transforming the original features into principal components.
Worked SolutionPrincipal Component Analysis (PCA)
PCA is an unsupervised dimensionality-reduction technique that transforms correlated numeric features into orthogonal principal components, ordered by how much variance they explain.
Steps:
- Center each feature (and often standardize when scales differ).
- Compute the covariance or correlation matrix.
- Find eigenvalues and eigenvectors (or use SVD).
- Sort eigenvectors by decreasing eigenvalue.
- Select the first (k) components using explained variance.
- Project centered data onto the selected eigenvectors: (Z=X_cW_k).
The first component captures the greatest possible variance; each subsequent component captures the greatest remaining variance subject to orthogonality. PCA is sensitive to scaling and captures linear variance, not necessarily class separation.
MermaidDiagramRendering diagram…4(b). Explain Bayesian Learning in detail. Discuss Maximum Likelihood, Maximum A Posteriori and Bayes estimation, and explain the role of conjugate priors with suitable examples.20267m
Module 2: Statistical Decision Theory and Bayesian Learning
View this question on its own page →Explain Bayesian Learning in detail. Discuss Maximum Likelihood, Maximum A Posteriori and Bayes estimation, and explain the role of conjugate priors with suitable examples.
Worked SolutionBayesian learning: ML, MAP and Bayes estimates
Bayesian learning updates prior beliefs using observed data:
[P(\theta\mid D)=\frac{P(D\mid\theta)P(\theta)}{P(D)}]
- Maximum Likelihood (ML): choose (\hat\theta_{ML}=\arg\max_\theta P(D\mid\theta)); uses likelihood only.
- Maximum A Posteriori (MAP): choose (\hat\theta_{MAP}=\arg\max_\theta P(D\mid\theta)P(\theta)); combines likelihood and prior.
- Bayes estimate: a posterior summary (often posterior mean) minimizing a specified expected loss; it need not equal the MAP estimate.
- Conjugate prior: a prior whose posterior stays in the same distribution family, simplifying updates.
Example: for Bernoulli data with success probability (p), a Beta((\alpha,\beta)) prior is conjugate. After (s) successes and (f) failures, posterior is Beta((\alpha+s,\beta+f)). The posterior mean is ((\alpha+s)/(\alpha+\beta+s+f)). A prior can regularize estimates when data are scarce.
5(a). Explain the Perceptron learning algorithm. Describe the weight and bias update rules and illustrate the algorithm with a suitable example.20267m
Module 3: Linear Classification and Advanced Methods
View this question on its own page →Explain the Perceptron learning algorithm. Describe the weight and bias update rules and illustrate the algorithm with a suitable example.
Worked SolutionPerceptron learning algorithm
A perceptron is a linear binary classifier. For input vector (x), weights (w), and bias (b), compute (z=w^Tx+b) and predict 1 when (z\ge0), otherwise 0.
For target (y\in{0,1}) and prediction (\hat y), update on mistakes:
where (\eta>0) is the learning rate. Repeat over training examples until a stopping condition is reached. The algorithm converges in finite updates for linearly separable data; it may not converge for non-separable data.
MermaidDiagramRendering diagram…5(b). Explain Support Vector Machines. Discuss the concept of maximum-margin hyperplane, support vectors, and soft margin.20267m
Module 3: Linear Classification and Advanced Methods
View this question on its own page →Explain Support Vector Machines. Discuss the concept of maximum-margin hyperplane, support vectors, and soft margin.
Worked SolutionSupport Vector Machine (SVM)
SVM finds a separating hyperplane with the largest margin between classes. The closest training examples are support vectors; they determine the boundary.
For a linear separator (w^Tx+b=0), the geometric margin is proportional to (1/\lVert w\rVert). A soft-margin SVM allows violations using slack variables (\xi_i):
[\min_{w,b,\xi};\frac12\lVert w\rVert^2+C\sum_i\xi_i]
subject to (y_i(w^Tx_i+b)\ge1-\xi_i), (\xi_i\ge0). Large (C) penalizes violations more strongly; smaller (C) allows a wider margin with more violations. Kernel functions can create nonlinear decision boundaries by implicitly mapping data into a higher-dimensional feature space.
6(a). Using the ID3 algorithm, construct a decision tree for the given dataset: Outlook, Temperature, Humidity, Wind, Play. Rows: Sunny, Hot, High, Weak, No; Sunny, Mild, High, Strong, No; Overcast, Hot, High, Weak, Yes; Rain, Mild, High, Weak, Yes; Rain, Cool, Normal, Weak, Yes; Rain, Cool, Normal, Strong, No; Overcast, Cool, Normal, Strong, Yes; Sunny, Cool, Normal, Weak, Yes; Sunny, Mild, Normal, Weak, Yes; Rain, Mild, Normal, Weak, Yes.20267m
Module 3: Linear Classification and Advanced Methods
View this question on its own page →Using the ID3 algorithm, construct a decision tree for the given dataset: Outlook, Temperature, Humidity, Wind, Play. Rows: Sunny, Hot, High, Weak, No; Sunny, Mild, High, Strong, No; Overcast, Hot, High, Weak, Yes; Rain, Mild, High, Weak, Yes; Rain, Cool, Normal, Weak, Yes; Rain, Cool, Normal, Strong, No; Overcast, Cool, Normal, Strong, Yes; Sunny, Cool, Normal, Weak, Yes; Sunny, Mild, Normal, Weak, Yes; Rain, Mild, Normal, Weak, Yes.
Worked SolutionID3 decision tree
ID3 selects the attribute with the highest information gain, where entropy is (H(S)=-\sum_c p_c\log_2p_c). For this dataset,
Outlookis a useful root:Overcastrows are allYes; theSunnyrows separate byHumidity; theRainrows separate byWind.MermaidDiagramRendering diagram…The tree correctly classifies all listed training rows. ID3 is greedy: it chooses the best immediate information gain at each step and can overfit without pruning or suitable stopping rules.
6(b). Given the 2D points A(1,1), B(1,2), C(2,1), D(2,2), E(8,8), F(8,9), G(9,8), H(15,15), use DBSCAN with ε = 1.5 and MinPts = 3 to identify core, border and noise points and determine the clusters.20267m
Module 5: Clustering
View this question on its own page →Given the 2D points A(1,1), B(1,2), C(2,1), D(2,2), E(8,8), F(8,9), G(9,8), H(15,15), use DBSCAN with ε = 1.5 and MinPts = 3 to identify core, border and noise points and determine the clusters.
Worked SolutionDBSCAN with ε = 1.5 and MinPts = 3
Assume MinPts includes the point itself. A point is core if its ε-neighborhood contains at least 3 points. Points A–D are mutually within distance (\sqrt2\approx1.414), so each has at least 4 points in its neighborhood. E, F and G are also mutually within ε (their pairwise distances are 1 or (\sqrt2)), so each has 3 points including itself. H is far from every other point.
- Cluster 1: {A, B, C, D} — all core points.
- Cluster 2: {E, F, G} — all core points.
- Noise: H.
- Border points: none.
MermaidDiagramRendering diagram…- Install PocketlyBudget App•POCKETLY
Pocketly on Android
Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.
7(a). Explain ensemble learning and its motivation. Why can combining multiple weak or unstable learners improve prediction performance?20267m
Module 4: Hypothesis Testing and Ensemble Methods
View this question on its own page →Explain ensemble learning and its motivation. Why can combining multiple weak or unstable learners improve prediction performance?
Worked SolutionEnsemble learning
Ensemble learning combines predictions from multiple models to produce a stronger predictor. It is useful because a single model may be unstable, biased, or sensitive to sample variation.
- Bagging: train models on bootstrap samples and average/vote; mainly reduces variance.
- Boosting: train learners sequentially, emphasizing previous errors; can reduce bias and build a strong learner.
- Voting/stacking: combine predictions or learn how to combine them.
Ensembles work best when component models are reasonably accurate and make different errors. If every learner makes identical errors, combining them provides little benefit. Diversity, proper validation and avoiding data leakage are important.
7(b). Explain the Random Forest algorithm. Discuss the role of bootstrap samples and random feature selection.20267m
Module 4: Hypothesis Testing and Ensemble Methods
View this question on its own page →Explain the Random Forest algorithm. Discuss the role of bootstrap samples and random feature selection.
Worked SolutionRandom Forest algorithm
Random Forest trains many decision trees and aggregates their outputs. For each tree, it draws a bootstrap sample (sample with replacement) from the training set. At each split, it considers only a random subset of features, then chooses the best split among them.
Classification uses majority vote; regression commonly averages tree predictions. Bootstrap sampling and random feature subsets decorrelate trees, reducing variance compared with a single deep tree. Out-of-bag examples can estimate generalization error without a separate validation set. Important limitations include reduced interpretability, memory cost and weaker performance on some highly structured extrapolation tasks.
8(a). Explain the complete K-means algorithm. Discuss its objective function, convergence criterion, and major limitations.20267m
Module 5: Clustering
View this question on its own page →Explain the complete K-means algorithm. Discuss its objective function, convergence criterion, and major limitations.
Worked SolutionK-means clustering
K-means partitions data into (K) clusters by minimizing within-cluster squared distance:
Algorithm: (1) choose (K) initial centroids; (2) assign each point to the nearest centroid; (3) recompute each centroid as the mean of assigned points; (4) repeat assignment and update until assignments/centroids stop changing or a maximum iteration count is reached.
MermaidDiagramRendering diagram…Each iteration does not increase the objective, so the algorithm converges to a local optimum. Limitations: must choose K, sensitive to initialization and outliers, favors roughly spherical similarly scaled clusters, and requires numeric distance-compatible features.
8(b). Explain hierarchical clustering. Differentiate between agglomerative and divisive approaches and explain how a dendrogram is constructed.20267m
Module 5: Clustering
View this question on its own page →Explain hierarchical clustering. Differentiate between agglomerative and divisive approaches and explain how a dendrogram is constructed.
Worked SolutionHierarchical clustering
Hierarchical clustering builds a nested sequence of clusters and represents it using a dendrogram.
- Agglomerative (bottom-up): begin with each point as its own cluster; repeatedly merge the closest clusters using a linkage rule (single, complete, average or Ward).
- Divisive (top-down): begin with all points in one cluster and recursively split them.
The dendrogram's leaves represent observations; branch heights represent merge/split dissimilarity. Cutting the dendrogram at a chosen height produces a flat clustering. Hierarchical clustering need not require K in advance, but naive implementations can be computationally expensive and early merges/splits are generally irreversible.
9(a). Write a short note on Q-Learning.20267m
Module 6: Advanced Topics
View this question on its own page →Write a short note on Q-Learning.
Worked SolutionQ-Learning
Q-learning is a model-free, off-policy reinforcement-learning algorithm that learns the action-value function (Q(s,a)): expected discounted return for taking action (a) in state (s).
[Q(s,a)\leftarrow Q(s,a)+\alpha[r+\gamma\max_{a'}Q(s',a')-Q(s,a)]]
Here (\alpha) is learning rate, (\gamma) is discount factor, (r) is immediate reward, and (s') is the next state. An ε-greedy policy balances exploration and exploitation. With sufficient exploration and suitable learning rates, tabular Q-learning converges under standard finite Markov decision process assumptions.
9(b). Write a short note on Bayesian Networks.20267m
Module 6: Advanced Topics
View this question on its own page →Write a short note on Bayesian Networks.
Worked SolutionBayesian Networks
A Bayesian Network is a directed acyclic graph (DAG) whose nodes represent random variables and whose edges encode conditional dependencies. Each node has a conditional probability table/distribution given its parents.
The joint distribution factorizes as:
[P(X_1,\ldots,X_n)=\prod_i P(X_i\mid Parents(X_i))]
For example,
Rain → WetGrass ← Sprinklerrepresents two possible causes of wet grass. Bayesian networks support probabilistic inference, diagnosis and reasoning under uncertainty. The graph structure encodes conditional independence assumptions; incorrect structure or probabilities can lead to poor inferences.9(c). Write a short note on Naive Bayes classifier.20267m
Module 3: Linear Classification and Advanced Methods
View this question on its own page →Write a short note on Naive Bayes classifier.
Worked SolutionNaive Bayes classifier
Naive Bayes is a probabilistic classifier based on Bayes' theorem and the assumption that features are conditionally independent given the class.
[P(C\mid x_1,\ldots,x_n)\propto P(C)\prod_iP(x_i\mid C)]
For a new example, calculate this score for each class and choose the largest posterior probability. Variants include Gaussian Naive Bayes for continuous features, Multinomial Naive Bayes for counts/text, and Bernoulli Naive Bayes for binary features. It is fast and effective for many text-classification tasks, but correlated features can make its probability estimates inaccurate.
9(d). Write a short note on Bagging and Boosting.20267m
Module 4: Hypothesis Testing and Ensemble Methods
View this question on its own page →Write a short note on Bagging and Boosting.
Worked SolutionBagging (bootstrap aggregating): train base learners independently on bootstrap samples and combine by voting or averaging. It mainly reduces variance; Random Forest is a bagging-based method with random feature selection.
Boosting: train learners sequentially so later learners focus on errors or residuals from earlier ones. AdaBoost reweights difficult observations; Gradient Boosting fits learners to loss gradients/residuals.
Bagging Boosting Learners can train in parallel Sequential dependency between rounds Bootstrap resampling Reweighting or residual fitting Primarily reduces variance Often reduces bias and builds strong predictors Less sensitive to individual noisy examples in many settings Can be sensitive to noise/outliers if overfit Both require validation and sensible tuning to avoid overfitting.
Pocketly on Android
Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.