ML Study Hub

Home / Past papers / MLT End Term / this paper

IIT M FOUNDATION FN EXAM QDF2 13 Apr - 13 Apr 2025

MLT End Term18 questions50 marks7 SA · 6 MCQ · 5 MSQFoundation / forenoon / QDF2
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 essential for the exam, followed by Mermaid knowledge graphs to visualize relationships.



1. Core Topics & 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 (+) in ties.
  1. Linear Regression

    • Normal Equation:
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 & SVM

    • Soft-Margin SVM:
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 Rule:

      • Misclassified points get higher weights.
      • Correctly classified points get lower weights.
      • Example: After 1st iteration (Q5), weights adjust to focus on errors.
  1. Naïve Bayes

    • Conditional Independence Assumption:
P(y∣x1,x2,...,xn)∝P(y)∏iP(xi∣y)P(y|x_1, x_2, ..., x_n) \propto P(y) \prod_i P(x_i|y)

B. Unsupervised Learning

  1. K-Means (Lloyd’s Algorithm)

    • Convergence: Stops when cluster assignments stabilize.
    • Initialization Sensitivity: Final centers depend on initial seeds.
    • Example: Final centers for given data (Q11).
  1. PCA vs. Kernel PCA

    • PCA: Linear transformation maximizing variance in original space.
    • Kernel PCA: Non-linear transformation via kernel trick (e.g., polynomial/RBF), maximizes variance in higher-dimensional space.
    • Use Case: Kernel PCA for non-linear patterns.

C. Model Evaluation & Ensemble Methods

  1. Bagging (Bootstrap Aggregating)

    • Variance Reduction: Averages multiple models (e.g., decision trees) trained on bootstrapped samples.
    • Parallel Training: Estimators are independent.
    • Out-of-Bag (OOB) Error: ~37% data points left out per tree (not "two-thirds").
  1. Boosting (AdaBoost)

    • Sequential Training: Each model corrects errors of the previous one.
    • Weighted Voting: Final prediction combines weak learners weighted by accuracy.

D. Regularization & Feature Selection

  1. Lasso (L1 Regularization)

    • Effect of λ:

      • Increases λ: Penalizes large coefficients → sparsity (some coefficients = 0).
      • Feature Selection: Automatically drops irrelevant features.
    • Contrast with Ridge (L2): Ridge shrinks but rarely zeros coefficients.
  1. Maximum Likelihood Estimation (MLE)

    • Uniform Distribution MLE:
θ^=max⁡(Xi)forXi∼Uniform[0,θ]\hat{\theta} = \max(X_i) \quad \text{for} \quad X_i \sim \text{Uniform}[0, \theta]

E. Neural Networks

  1. Single-Layer Perceptron

    • Activation: Sigmoid (σ), ReLU, etc.
    • Forward Pass:
h=σ(wTx+b),σ(z)=11+e−zh = \sigma(w^T x + b), \quad \sigma(z) = \frac{1}{1 + e^{-z}}
  1. Kernel SVM with Polynomial Kernel

    • Degree-2 Kernel:
ϕ(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

F. Trees & Decision Boundaries

  1. Decision Trees

    • Balanced Binary Tree: Leaf nodes = 2depth2^{\text{depth}} (Q10: depth 3 → 8 leaves).
  2. Support Vectors

    • Non-Support Vectors: Points not on the margin (Q17).


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
Soft-Margin SVMmin⁡w,ϵ12∥w∥2+C∑ϵi\min_{w, \epsilon} \frac{1}{2}\|w\|^2 + C \sum \epsilon_i
PCAmax⁡∥u∥=1uTXTXu\max_{\|u\|=1} u^T X^T X u (eigenvectors of XTXX^T X)
Kernel PCAmax⁡∥α∥=1αTKα\max_{\|\alpha\|=1} \alpha^T K \alpha (kernel matrix KK)
AdaBoost Weight UpdateDt(i)=Dt−1(i)exp⁡(−αtyiht(xi))ZtD_t(i) = \frac{D_{t-1}(i) \exp(-\alpha_t y_i h_t(x_i))}{Z_t}
MLE (Uniform)θ^=max⁡(Xi)\hat{\theta} = \max(X_i)
Naïve BayesP(y∣x)∝P(y)∏iP(xi∣y)P(y|x) \propto P(y) \prod_i P(x_i|y)
Perceptron Updatew←w+η⋅yixiw \leftarrow w + \eta \cdot y_i x_i (if misclassified)
Sigmoid Activationσ(z)=11+e−z\sigma(z) = \frac{1}{1 + e^{-z}}


Graph 2: Unsupervised Learning & Dimensionality Reduction

Graph 3: Ensemble Methods

Graph 4: Regularization & Feature Selection

Graph 5: Neural Networks & Kernels



4. Exam Tips

  1. k-NN: Higher k → smoother decision boundaries (lower LOOCV error).
  2. Ridge/Lasso: Match weight vectors to λ (smaller λ → larger weights).
  3. SVM: C=0 → hard margin; C→∞ → overfits.
  4. AdaBoost: Misclassified points get higher weights in next iteration.
  5. PCA vs. Kernel PCA: Kernel PCA for non-linear patterns.
  6. Bagging: Reduces variance; estimators are independent.
  7. Lasso: Increases λ → more coefficients zeroed out.
  8. K-Means: Final centers depend on initialization.
  9. MLE for Uniform: θ^=max⁡(Xi)\hat{\theta} = \max(X_i).
  10. Naïve Bayes: Count parameters carefully (Gaussian/Bernoulli).
  11. Perceptron: Converges if data is linearly separable.
  12. Kernel SVM: Degree-2 polynomial → elliptical boundary.