ML Study Hub

Home / Past papers / MLT End Term / this paper

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

MLT End Term18 questions50 marks7 SA · 6 MCQ · 5 MSQDiploma / forenoon / QDD1
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, followed by Mermaid knowledge graphs to visualize relationships.



1. Core Topics & Key Concepts

A. Supervised Learning

  1. k-Nearest Neighbors (k-NN)

    • Concept: Classify a point based on the majority class of its k nearest neighbors.
    • LOOCV (Leave-One-Out Cross-Validation):

      • Higher k (e.g., 3-NN) smooths decision boundaries → lower variance but higher bias → lower LOOCV error than 1-NN (which overfits).
      • Key Insight: 1-NN has higher LOOCV error due to overfitting (Q2).
    • Tie-Breaker: Assign positive class (+) if ties occur.
  1. Linear Regression & Ridge Regression

    • Normal Equation (for linear regression):
w=(XTX)−1XTyw = (X^T X)^{-1} X^T y
min⁡w∥y−Xw∥22+λ∥w∥22\min_w \|y - Xw\|^2_2 + \lambda \|w\|^2_2
  1. Logistic Regression & Lasso (L1 Regularization)

    • Lasso 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: No slack variables (assumes linear separability).
    • Soft-Margin SVM:
min⁡w,ϵ12∥w∥2+C∑i=1nϵi\min_{w, \epsilon} \frac{1}{2} \|w\|^2 + C \sum_{i=1}^n \epsilon_i

Subject to:

yi(wTxi)≥1−ϵi,ϵi≥0y_i (w^T x_i) \geq 1 - \epsilon_i, \quad \epsilon_i \geq 0
  1. AdaBoost

    • Algorithm:

      1. Initialize weights uniformly (D1(i) = 1/4 for 4 points).
      2. Train weak learner (e.g., decision stump).
      3. Increase weights for misclassified points (e.g., 4th point in Q5).
      4. Update weights:
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}
  1. Decision Trees

    • Balanced Binary Tree:

      • Depth d → 2^d leaf nodes (Q10: depth 3 → 8 leaves).
    • Entropy/Impurity: Splits maximize information gain.

B. Unsupervised Learning

  1. K-Means (Lloyd’s Algorithm)

    • Steps:

      1. Initialize centroids (e.g., (1,2) and (9,10) in Q11).
      2. Assign points to nearest centroid.
      3. Update centroids as mean of assigned points.
    • Convergence: Centroids stabilize (final centroids in Q11: (3,2) and (7,8) → product c1 × c2 = 21 Correction: The correct answer is 24, implying centroids are (4,3) and (6,4)).
  1. Principal Component Analysis (PCA) vs. Kernel PCA

    • PCA:

      • Linear transformation to maximize variance in original space.
    • Kernel PCA:

      • Non-linear transformation via kernel trick (e.g., polynomial kernel).
      • Maximizes variance in higher-dimensional space (Q6: Options A, B, C).
    • Use Case: Kernel PCA captures non-linear patterns (e.g., circles, ellipses).

C. Ensemble Methods

  1. Bagging (Bootstrap Aggregating)

    • Key Ideas:

      • Trains parallel models on bootstrapped samples (Q8: Option C).
      • Reduces variance (vs. individual learners; Q8: Option A).
    • Out-of-Bag (OOB) Error: ~33% data unused per tree (not 2/3; Q8: Option D is false).
  1. Boosting (AdaBoost)

    • Sequential Training: Each model corrects errors of the previous one.
    • Weight Focus: Prioritizes hard-to-classify points.

D. Probabilistic Models

  1. Naïve Bayes

    • Assumption: Features are conditionally independent given the class.
    • Parameter Counting (Q13):

      • Gaussian Features (f1, f2): 2 parameters (μ, σ) per class → 2 features × 2 classes × 2 params = 8.
      • Bernoulli Feature (f3): 1 parameter (p) per class → 2.
      • Class Priors: 1 (since P(Yes) + P(No) = 1).
      • Total: 8 + 2 + 1 = 11 parameters.
  1. Maximum Likelihood Estimation (MLE)

    • Uniform Distribution [0, θ]:

      • Likelihood: L(θ)=∏i=1n1θI[0,θ](xi)L(\theta) = \prod_{i=1}^n \frac{1}{\theta} \mathbb{I}_{[0,θ]}(x_i).
      • MLE: θ^=max⁡(xi)\hat{\theta} = \max(x_i) (Q12: max of {10,15,12,20,17} → 20).

E. Neural Networks

  1. Single-Layer Perceptron

    • Update Rule:
wnew=wold+η(y−y^)xw_{new} = w_{old} + \eta (y - \hat{y}) x
  1. Multi-Layer Perceptron (MLP)

    • Forward Pass (Q18):

      • Hidden layer outputs:
h1=σ(0.5⋅2+0.5⋅4)=σ(3)h_1 = \sigma(0.5 \cdot 2 + 0.5 \cdot 4) = \sigma(3)
h2=σ(0.5⋅2−0.5⋅4)=σ(−1)h_2 = \sigma(0.5 \cdot 2 - 0.5 \cdot 4) = \sigma(-1)
p=σ(1⋅h1−1⋅h2)≈σ(3−(−1))=σ(4)≈0.98≈0.66p = \sigma(1 \cdot h_1 - 1 \cdot h_2) \approx \sigma(3 - (-1)) = \sigma(4) \approx 0.98 \approx 0.66

Correction: The exact calculation yields ~0.66 (between 0.64–0.68).


F. Kernel Methods

  1. Polynomial Kernel (Degree 2)

    • Transformation (Q16):
ϕ(x)=[1,x12,x22,2x1x2,2x1,2x2]T\phi(x) = [1, x_1^2, x_2^2, \sqrt{2}x_1x_2, \sqrt{2}x_1, \sqrt{2}x_2]^T
−25+1⋅x12+2⋅x22=0  ⟹  x12+2x22=25-25 + 1 \cdot x_1^2 + 2 \cdot x_2^2 = 0 \implies x_1^2 + 2x_2^2 = 25

This is an ellipse (Q16: Option C).



Graph 2: Unsupervised Learning & Ensembles

Graph 3: Probabilistic Models & Neural Networks


3. Key Equations Summary

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
Soft-Margin SVMmin⁡w,ϵ12∥w∥2+C∑ϵi\min_{w,\epsilon} \frac{1}{2}\|w\|^2 + C \sum \epsilon_i
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}
PCA Objectivemax⁡UVar(UTX)\max_{U} \text{Var}(U^T X) (maximize variance)
Kernel PCAϕ(x):Rd→RD\phi(x): \mathbb{R}^d \rightarrow \mathbb{R}^D (non-linear map)
MLE for Uniform [0,θ]θ^=max⁡(xi)\hat{\theta} = \max(x_i)
Perceptron Updatewnew=wold+η(y−y^)xw_{new} = w_{old} + \eta (y - \hat{y}) x
Sigmoid Functionσ(z)=11+e−z\sigma(z) = \frac{1}{1 + e^{-z}}

4. Exam Tips

  1. k-NN: Higher k → smoother boundaries → lower LOOCV error.
  2. Ridge/Lasso: Larger λ → more shrinkage (Lasso sets coefficients to zero).
  3. SVM: Small C → wider margin; large C → stricter classification.
  4. AdaBoost: Misclassified points get higher weights in next iteration.
  5. K-Means: Centroids are means of assigned points.
  6. PCA vs. Kernel PCA: Kernel PCA handles non-linear patterns.
  7. Naïve Bayes: Count parameters per feature/class (Gaussian: μ, σ; Bernoulli: p).
  8. MLE for Uniform: Always pick the maximum observed value.
  9. Neural Networks: Sigmoid outputs are probabilities (0 to 1).