ML Study Hub

Home / Past papers / MLT End Term / this paper

IIT M FOUNDATION DIPLOMA FN EXAM QDF1 28 Apr 2024 - 28 Apr 2024

MLT End Term16 questions50 marks6 SA · 6 MSQ · 4 MCQFoundation / Diploma / forenoon / QDF1
Elapsed 00:00
Q1SA3 marks
question figure
Q2SA3 marks
question figure
Q3SA3 marks
question figure
Q4SA3 marks
question figure
Q5SA3 marks
question figure
Q6SA3 marks
question figure
Q7MCQ3 marks
Consider a dataset with two features (Feature 1 and Feature 2) exhibiting a perfect positive correlation (1). If you apply k-means clustering with k = 3, what is the most likely arrangement of cluster centers that minimizes the within-cluster sum of squares (WCSS)?
  1. An equilateral triangle centered around the mean of the data.
  2. Cluster centers positioned along a straight line.
  3. A triangle with two acute angles, positioned strategically within the datadistribution.
  4. A right-angled triangle with one center at the origin.
Q8MCQ3 marks
question figure
  1. Model 1
  2. Model 2
  3. Both models are equally sensitive to outliers
  4. Insufficient data
Q9MCQ3 marks
question figure
  1. 1
  2. 2
  3. 4
  4. It oscillates and never converges
Q10MCQ3 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q11MSQ3 marksselect all that apply
Which of the following are true about the kernel function? Assume that the dataset X is mean centered.
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q12MSQ3 marksselect all that apply
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q13MSQ3 marksselect all that apply
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q14MSQ3 marksselect all that apply
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q15MSQ4 marksselect all that apply
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
  5. question figure
  6. question figure
Q16MSQ4 marksselect all that apply
question figure
  1. Points {F, I} are the only support vectors.
  2. Points {A, N} are a subset of support vectors.
  3. Points {F, A, C, I} are the only support vectors.
  4. Points except {F, A, C, I, N} do not play any role in determining optimal weightvector.
  5. Points except {F, A, C, I} do not play any role in determining optimal weightvector.

Answer key

  1. Q1 (SA, 3 marks): 7
  2. Q2 (SA, 3 marks): 0.80
  3. Q3 (SA, 3 marks): 0.25
  4. Q4 (SA, 3 marks): 0
  5. Q5 (SA, 3 marks): 25
  6. Q6 (SA, 3 marks): 0.70 to 0.80
  7. Q7 (MCQ, 3 marks): B
  8. Q8 (MCQ, 3 marks): B
  9. Q9 (MCQ, 3 marks): A
  10. Q10 (MCQ, 3 marks): B
  11. Q11 (MSQ, 3 marks): A, C
  12. Q12 (MSQ, 3 marks): B, C
  13. Q13 (MSQ, 3 marks): A, B
  14. Q14 (MSQ, 3 marks): A, C
  15. Q15 (MSQ, 4 marks): A, B, D, E
  16. Q16 (MSQ, 4 marks): B, D

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 the core topics, concepts, principles, and equations essential for the Diploma Level: Machine Learning Techniques exam, along with Mermaid knowledge graphs to visualize relationships.



1. Core Topics & Key Concepts

A. Linear Algebra & Statistics

  1. Covariance Matrix & Eigenvalues

    • Covariance matrix CC for a dataset X∈Rn×dX \in \mathbb{R}^{n \times d}:
C=1n−1(X−Xˉ)T(X−Xˉ)C = \frac{1}{n-1} (X - \bar{X})^T (X - \bar{X})
Var(X)=λ1+λ2+λ3\text{Var}(X) = \lambda_1 + \lambda_2 + \lambda_3
  1. Probability & Distributions

    • Bernoulli Distribution:
P(xi=1)=p,P(xi=0)=1−pP(x_i = 1) = p, \quad P(x_i = 0) = 1 - p
p^=1n∑i=1nxi\hat{p} = \frac{1}{n} \sum_{i=1}^n x_i
p^1=Sum of Group 1 labelsSize of Group 1,p^2=Sum of Group 2 labelsSize of Group 2\hat{p}_1 = \frac{\text{Sum of Group 1 labels}}{\text{Size of Group 1}}, \quad \hat{p}_2 = \frac{\text{Sum of Group 2 labels}}{\text{Size of Group 2}}
  1. Bayesian Probability (Naive Bayes)

    • Conditional independence assumption:
P(x∣y)=∏j=1dP(xj∣y)P(x|y) = \prod_{j=1}^d P(x_j|y)
P(y=0∣xtest)∝P(y=0)∏j=13P(fj∣y=0)P(y=0|x_{\text{test}}) \propto P(y=0) \prod_{j=1}^3 P(f_j|y=0)

B. Supervised Learning

  1. Decision Trees

    • Splitting rules (e.g., Question 4):

      • Split on x1<0.5x_1 < 0.5, then x2>0.5x_2 > 0.5.
      • Probability of class 0 = Area of region where x1<0.5x_1 < 0.5 and x2>0.5x_2 > 0.5:
Area=0.5×0.5=0.25\text{Area} = 0.5 \times 0.5 = 0.25
  1. Perceptron Algorithm

    • Update rule (e.g., Questions 6, 10):
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
Max mistakes≤(Rγ)2\text{Max mistakes} \leq \left( \frac{R}{\gamma} \right)^2

where R=max⁡∣∣xi∣∣R = \max ||x_i||, γ=min⁡yi(wTxi)\gamma = \min y_i (w^T x_i).

  1. Support Vector Machines (SVM)

    • Hard-margin SVM (e.g., Question 14):

      • Linearly separable if a hyperplane exists with yi(wTxi+b)≥1y_i (w^T x_i + b) \geq 1.
      • Margin width:
Width=2∣∣w∣∣\text{Width} = \frac{2}{||w||}
min⁡12∣∣w∣∣2+C∑ξis.t.yi(wTxi+b)≥1−ξi,ξi≥0\min \frac{1}{2} ||w||^2 + C \sum \xi_i \quad \text{s.t.} \quad y_i (w^T x_i + b) \geq 1 - \xi_i, \xi_i \geq 0
  1. Linear Regression

    • Normal equation (e.g., Question 13):
w∗=(XXT)−1Xyw^* = (X X^T)^{-1} X y

C. Unsupervised Learning

  1. K-Means Clustering

    • Objective: Minimize within-cluster sum of squares (WCSS).
    • Behavior with correlated features (e.g., Question 8):

      • If features are perfectly correlated (ρ=1\rho = 1), clusters align along a straight line (not triangular).
  1. Principal Component Analysis (PCA) & Kernel PCA

    • Standard PCA = Kernel PCA with linear kernel k(xi,xj)=xiTxjk(x_i, x_j) = x_i^T x_j (e.g., Question 12).
    • Kernel trick: Can map data to infinite dimensions (e.g., polynomial kernel k(xi,xj)=(xiTxj+1)2k(x_i, x_j) = (x_i^T x_j + 1)^2).

D. Neural Networks

  1. Feedforward Neural Network (e.g., Question 7)

    • Hidden layer with sigmoid activation:
σ(z)=11+e−z,z=wTx+b\sigma(z) = \frac{1}{1 + e^{-z}}, \quad z = w^T x + b
y^=woutTh+bout\hat{y} = w_{\text{out}}^T h + b_{\text{out}}
z=0.5⋅0.6+(−0.2)⋅0.3+0.8⋅0.8+0.1=0.94z = 0.5 \cdot 0.6 + (-0.2) \cdot 0.3 + 0.8 \cdot 0.8 + 0.1 = 0.94
σ(0.94)≈0.72(Answer∈[0.7,0.8])\sigma(0.94) \approx 0.72 \quad (\text{Answer} \in [0.7, 0.8])

E. Ensemble Methods

  1. AdaBoost

    • Weighted misclassification error (e.g., Question 15):
ϵt=∑i=1nDt(i)⋅1(ht(xi)≠yi)\epsilon_t = \sum_{i=1}^n D_t(i) \cdot \mathbb{1}(h_t(x_i) \neq y_i)

F. Optimization

  1. Lagrangian & Duality (e.g., Question 11)

    • Lagrangian for constrained optimization:
L(x,λ)=f(x)+∑λigi(x)L(x, \lambda) = f(x) + \sum \lambda_i g_i(x)


2. Key Equations Summary

TopicEquation
Covariance MatrixC=1n−1(X−Xˉ)T(X−Xˉ)C = \frac{1}{n-1} (X - \bar{X})^T (X - \bar{X})
Total VarianceVar(X)=∑λi\text{Var}(X) = \sum \lambda_i
Bernoulli MLEp^=1n∑xi\hat{p} = \frac{1}{n} \sum x_i
Naive Bayes PosteriorP(y∣x)∝P(y)∏P(xj∣y)P(y|x) \propto P(y) \prod P(x_j|y)
Perceptron Updatew←w+ηyixiw \leftarrow w + \eta y_i x_i if misclassified
SVM MarginWidth=2∣∣w∣∣\text{Width} = \frac{2}{||w||}
Soft-margin SVMmin⁡12∣∣w∣∣2+C∑ξi\min \frac{1}{2} ||w||^2 + C \sum \xi_i
K-Means Objectivemin⁡∑i=1n∣∣xi−μci∣∣2\min \sum_{i=1}^n ||x_i - \mu_{c_i}||^2
Neural Network (Sigmoid)σ(z)=11+e−z\sigma(z) = \frac{1}{1 + e^{-z}}
AdaBoost Errorϵt=∑Dt(i)⋅1(ht(xi)≠yi)\epsilon_t = \sum D_t(i) \cdot \mathbb{1}(h_t(x_i) \neq y_i)
Linear Regressionw∗=(XXT)−1Xyw^* = (X X^T)^{-1} X y


Graph 2: Unsupervised Learning & Dimensionality Reduction

Graph 3: Probability & Estimation

Graph 4: Optimization & Neural Networks



4. Exam Strategy

  1. Focus Areas:

    • Eigenvalues/Covariance: Solve linear systems for eigenvalues (Question 2).
    • MLE for Bernoulli: Separate estimates for groups (Question 3).
    • Geometric Probability: Calculate areas for decision trees (Question 4).
    • Naive Bayes: Check for zero posterior (Question 5).
    • Perceptron: Mistake bound and convergence (Questions 6, 10).
    • SVM: Margin width, KKT conditions, and kernels (Questions 14, 16, 17).
    • K-Means: Cluster shapes with correlated data (Question 8).
    • Neural Networks: Forward pass calculations (Question 7).
    • AdaBoost: Weight updates (Question 15).
  1. Common Pitfalls:

    • Misapplying conditional independence in Naive Bayes.
    • Confusing hard-margin vs. soft-margin SVM.
    • Incorrectly calculating areas for decision tree probabilities.
    • Forgetting to normalize or center data for PCA/SVM.
  1. Time Management:

    • Spend ~1-2 minutes per question on average.
    • Prioritize calculations (e.g., eigenvalues, MLE) over theoretical questions.