ML Study Hub

Home / Past papers / MLT End Term / this paper

IIT M DIPLOMA FN EXAM QDD2 13 Apr 2025 - 13 Apr 2025

MLT End Term18 questions50 marks7 SA · 6 MCQ · 5 MSQDiploma / forenoon / QDD2
Elapsed 00:00
Q1MCQ3 marks
For a given dataset, a 1-Nearest Neighbor (1-NN) and a 3-Nearest Neighbor (3-NN) classifier are applied. Which classifier is likely to exhibit a higher Leave-One-Out Cross Validation (LOOCV) error? In case of tie-breaker, assign a positive class (+) to the data point. question figure For a given dataset, a 1-Nearest Neighbor (1-NN) and a 3-Nearest Neighbor (3-NN) classifier are applied. Which classifier is likely to exhibit a higher Leave-One-Out Cross Validation (LOOCV) error? In case of tie-breaker, assign a positive class (+) to the data point.
  1. 1-NN
  2. 3-NN
  3. Both have the same error.
Q2MCQ3 marks
question figure
  1. question figure
  2. question figure
  3. question figure
Q3MCQ4 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q4MCQ4 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q5MSQ3 marksselect all that apply
Which of the following statements correctly differentiates PCA and Kernel PCA?
  1. PCA maximizes variance in the original feature space, while Kernel PCAmaximizes variance in a higher-dimensional transformed space.
  2. PCA finds principal components using linear transformations in the originalspace, while Kernel PCA uses non-linear transformations to find principal components in a higher-dimensional space.
  3. Kernel PCA can capture non-linear patterns in data, making it useful when PCAfails to represent complex structures in a linear space.
  4. PCA and Kernel PCA always yield identical results regardless of the datasetstructure.
Q6MSQ3 marksselect all that apply
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
  5. question figure
Q7MSQ2 marksselect all that apply
Which of the following statements are true for bagging?
  1. The final model has lesser variance than the individual learners.
  2. The final model has a higher variance than the individual learners.
  3. Estimators in bagging can be trained parallely.
  4. If the number of data points is large, typically two-third of the data pointsremain unselected in bags.
Q8MSQ2 marksselect all that apply
question figure
  1. It penalizes large coefficients to reduce overfitting.
  2. It shrinks the coefficients but does not set them to zero.
  3. It forces more coefficients to be exactly zero, performing feature selection.
  4. It has no effect on the regression model.
Q9SA2 marks
For a decision tree, each node has exactly two child nodes (balanced tree). If the tree has a depth of 3, how many leaf nodes are there?
Q10SA3 marks
question figure
Q11SA3 marks
question figure
Q12SA3 marks
question figure
Comprehension passage - the questions below it refer to this
Based on the above data, answer the given subquestions. question figure
Q13SA3 marks
question figure
Q14MCQ2 marks
Will the algorithm converge after this update?
  1. YES
  2. NO
Comprehension passage - the questions below it refer to this
Based on the above data, answer the given subquestions. question figure
Q15MCQ2 marks
question figure
  1. It is a circle.
  2. It is a straight line.
  3. It is an ellipse.
  4. It is a parabola.
Q16MSQ3 marksselect all that apply
Which of the following training data points are certainly not support vectors?
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Comprehension passage - the questions below it refer to this
Based on the above data, answer the given subquestions. question figure
Q17SA3 marks
question figure
Q18SA2 marks
question figure

Answer key

  1. Q1 (MCQ, 3 marks): A
  2. Q2 (MCQ, 3 marks): C
  3. Q3 (MCQ, 4 marks): B
  4. Q4 (MCQ, 4 marks): B
  5. Q5 (MSQ, 3 marks): A, B, C
  6. Q6 (MSQ, 3 marks): B, D, E
  7. Q7 (MSQ, 2 marks): A, C
  8. Q8 (MSQ, 2 marks): A, C
  9. Q9 (SA, 2 marks): 8
  10. Q10 (SA, 3 marks): 24
  11. Q11 (SA, 3 marks): 20
  12. Q12 (SA, 3 marks): 11
  13. Q13 (SA, 3 marks): 1
  14. Q14 (MCQ, 2 marks): A
  15. Q15 (MCQ, 2 marks): C
  16. Q16 (MSQ, 3 marks): A, C
  17. Q17 (SA, 3 marks): 0.64 to 0.68
  18. Q18 (SA, 2 marks): 1

Concepts this paper tests

Auto-generated summary from the source site. Handy as a checklist; the lessons above explain each idea from scratch.

Here’s a structured summary of core topics, concepts, principles, and equations for the Diploma-Level Machine Learning Techniques exam, along with Mermaid knowledge graphs to visualize relationships.



1. Core Topics & Key Concepts

A. Supervised Learning

  1. k-Nearest Neighbors (k-NN)

    • LOOCV Error: 1-NN often has higher variance (overfits) than 3-NN, leading to higher LOOCV error.
    • Tie-Breaker: Assign positive class (+) if ties occur.
    • Key Idea: Larger k smooths decision boundaries (reduces overfitting).
  1. Linear Regression (Normal Equation)

    • Model: y=w1x1+w2x2+⋯+wdxdy = w_1 x_1 + w_2 x_2 + \dots + w_d x_d
    • Normal Equation:
w=(XTX)−1XTyw = (X^T X)^{-1} X^T y
  1. Ridge Regression (L2 Regularization)

    • Objective:
min⁡w∥y−Xw∥22+λ∥w∥22\min_w \|y - Xw\|_2^2 + \lambda \|w\|_2^2
  1. Lasso Regression (L1 Regularization)

    • Objective:
min⁡w∥y−Xw∥22+λ∥w∥1\min_w \|y - Xw\|_2^2 + \lambda \|w\|_1
  1. Support Vector Machines (SVM)

    • Hard-Margin SVM:
min⁡w12∥w∥2s.t.yi(wTxi)≥1\min_w \frac{1}{2} \|w\|^2 \quad \text{s.t.} \quad y_i(w^T x_i) \geq 1
min⁡w,ϵ12∥w∥2+C∑ϵis.t.yi(wTxi)≥1−ϵi,ϵi≥0\min_{w,\epsilon} \frac{1}{2} \|w\|^2 + C \sum \epsilon_i \quad \text{s.t.} \quad y_i(w^T x_i) \geq 1 - \epsilon_i, \epsilon_i \geq 0
  1. AdaBoost

    • Weight Update: Misclassified points get higher weights in next iteration.
    • Example: If 1 point is misclassified (out of 4), its weight increases to 1/2, others decrease to 1/6.
    • Formula:
Dt+1(i)=Dt(i)exp⁡(−αtyift(xi))ZtD_{t+1}(i) = \frac{D_t(i) \exp(-\alpha_t y_i f_t(x_i))}{Z_t}

where αt=12ln⁡(1−ϵtϵt)\alpha_t = \frac{1}{2} \ln \left( \frac{1 - \epsilon_t}{\epsilon_t} \right).

  1. Decision Trees

    • Binary Tree: Each node splits into 2 children.
    • Leaf Nodes: For depth d, number of leaves = 2d2^d.
    • Example: Depth 3 → 8 leaves.

B. Unsupervised Learning

  1. K-Means (Lloyd’s Algorithm)

    • Steps:

      1. Initialize centroids (e.g., (1,2)(1,2) and (9,10)(9,10)).
      2. Assign points to nearest centroid.
      3. Update centroids as mean of assigned points.
    • Convergence: Stops when centroids stabilize.
    • Example: Final centroids (c1,d1)(c_1, d_1) and (c2,d2)(c_2, d_2) → compute c1×c2c_1 \times c_2.
  1. Principal Component Analysis (PCA) vs. Kernel PCA

    • PCA:

      • Maximizes variance in original feature space.
      • Linear transformation: Xnew=XWX_{new} = X W.
    • Kernel PCA:

      • Maximizes variance in higher-dimensional space (via kernel trick).
      • Captures non-linear patterns (e.g., circles, ellipses).
    • Key Difference: PCA is linear; Kernel PCA is non-linear.

C. Probabilistic Models

  1. Naïve Bayes

    • Assumption: Features are conditionally independent given the class.
    • Parameter Count:

      • Gaussian features: 2 parameters (μ, σ²) per feature per class.
      • Bernoulli features: 1 parameter (p) per feature per class.
      • Class priors: 1 parameter per class.
    • Example: 2 Gaussian features + 1 Bernoulli feature + 2 classes → 11 parameters (not 12; class priors sum to 1).
  1. Maximum Likelihood Estimation (MLE)

    • Uniform Distribution: f(x;θ)=1θf(x; \theta) = \frac{1}{\theta} for 0≤x≤θ0 \leq x \leq \theta.
    • MLE for θ: θ^=max⁡(Xi)\hat{\theta} = \max(X_i).
    • Example: Sample {10,15,12,20,17}\{10, 15, 12, 20, 17\} → θ^=20\hat{\theta} = 20.

D. Ensemble Methods

  1. Bagging (Bootstrap Aggregating)

    • Key Ideas:

      • Trains multiple models on bootstrapped samples.
      • Reduces variance (vs. individual learners).
      • Parallelizable: Estimators are independent.
    • Out-of-Bag (OOB) Error: ~33% of data is left out per tree (for large datasets).
  1. Perceptron Algorithm

    • Update Rule:
w←w+η⋅yixiifyi(wTxi)≤0w \leftarrow w + \eta \cdot y_i x_i \quad \text{if} \quad y_i(w^T x_i) \leq 0

E. Neural Networks

  1. Single-Layer Neural Network

    • Architecture:

      • Input layer → Hidden layer (2 neurons) → Output layer (sigmoid).
    • Forward Pass:
h1=σ(w1(1)x1+w2(1)x2),h2=σ(w1(2)x1+w2(2)x2)h_1 = \sigma(w_1^{(1)} x_1 + w_2^{(1)} x_2), \quad h_2 = \sigma(w_1^{(2)} x_1 + w_2^{(2)} x_2)
p=σ(w1outh1+w2outh2)p = \sigma(w^{out}_1 h_1 + w^{out}_2 h_2)


2. Key Equations

TopicEquation
Linear Regressionw=(XTX)−1XTyw = (X^T X)^{-1} X^T y
Ridge Regressionmin⁡w∥y−Xw∥22+λ∥w∥22\min_w \|y - Xw\|_2^2 + \lambda \|w\|_2^2
Lasso Regressionmin⁡w∥y−Xw∥22+λ∥w∥1\min_w \|y - Xw\|_2^2 + \lambda \|w\|_1
SVM (Primal)min⁡w12∥w∥2+C∑ϵi\min_w \frac{1}{2} \|w\|^2 + C \sum \epsilon_i
SVM (Dual)max⁡α∑αi−12∑αiαjyiyjxiTxj\max_\alpha \sum \alpha_i - \frac{1}{2} \sum \alpha_i \alpha_j y_i y_j x_i^T x_j
AdaBoost Weight UpdateDt+1(i)=Dt(i)exp⁡(−αtyift(xi))ZtD_{t+1}(i) = \frac{D_t(i) \exp(-\alpha_t y_i f_t(x_i))}{Z_t}
PCAXnew=XWX_{new} = X W (where WW = eigenvectors of XTXX^T X)
Kernel PCAK=ϕ(X)ϕ(X)TK = \phi(X) \phi(X)^T (kernel matrix)
Perceptron Updatew←w+ηyixiw \leftarrow w + \eta y_i x_i (if misclassified)
MLE (Uniform)θ^=max⁡(Xi)\hat{\theta} = \max(X_i)
Naïve Bayes (Gaussian)P(x∣y)=12πσy2exp⁡(−(x−μy)22σy2)P(x|y) = \frac{1}{\sqrt{2\pi\sigma_y^2}} \exp\left(-\frac{(x-\mu_y)^2}{2\sigma_y^2}\right)


Graph 2: Unsupervised Learning & Probabilistic Models

Graph 3: Ensemble Methods & Neural Networks



4. Exam Tips

  1. k-NN: Higher k → smoother boundaries → lower LOOCV error.
  2. Ridge/Lasso: Match θ\theta vectors to λ\lambda (smaller θ\theta → larger λ\lambda).
  3. SVM: C→0C \to 0 → hard margin; C→∞C \to \infty → soft margin.
  4. AdaBoost: Misclassified points get higher weights (e.g., 1/2 vs 1/6).
  5. PCA vs Kernel PCA: PCA is linear; Kernel PCA captures non-linear patterns.
  6. Naïve Bayes: Count parameters carefully (class priors sum to 1).
  7. Perceptron: Converges if data is linearly separable.
  8. Neural Networks: Compute hidden layer outputs step-by-step.