ML Study Hub

Home / Past papers / MLT End Term / this paper

IIT M IMPROVEMENT AN EXAM QIM3 13 Apr - 13 Apr 2025

MLT End Term17 questions50 marks6 MCQ · 6 SA · 5 MSQImprovement / afternoon / QIM3
Elapsed 00:00
Q1MSQ2 marksselect all that apply
What is the role of the regularization term in ridge regression?
  1. It ensures that the dataset is normally distributed.
  2. It penalizes large coefficients to reduce overfitting.
  3. It forces more coefficients to be exactly zero, performing feature selection.
  4. It increases the variance of the model.
Q2MSQ2 marksselect all that apply
Which of the following conditions must be satisfied for a decision tree to be pure at a given node?
  1. The entropy of the node is maximum.
  2. The information gain at the node is negative.
  3. All samples at a node belong to the same class.
  4. The entropy of the node is 0.
Q3MCQ3 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q4MCQ3 marks
question figure
  1. question figure
  2. question figure
  3. question figure
Q5MCQ2 marks
question figure
  1. Kernel PCA with a polynomial kernel of degree 2.
  2. Kernel PCA with a polynomial kernel of degree 3.
  3. Kernel PCA with a polynomial kernel of degree 4.
  4. Standard PCA
Q6MCQ1 mark
Weak learners used in the ensemble method typically perform slightly better than random guessing.
  1. TRUE
  2. FALSE
Q7MSQ3 marksselect all that apply
question figure
  1. Model 1 will have a higher bias than Model 2.
  2. Model 2 will have a lower variance than Model 1.
  3. Model 1 is more likely to underfit.
  4. Model 1 is more likely to overfit.
Q8MSQ3 marksselect all that apply
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
  5. question figure
Q9MSQ4 marksselect all that apply
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
  5. question figure
  6. question figure
Q10SA4 marks
question figure
Q11SA4 marks
question figure
Q12SA4 marks
question figure
Q13SA4 marks
The following dataset represents different weather conditions and the corresponding decision on whether a person chooses to play tennis: question figure The following dataset represents different weather conditions and the corresponding decision on whether a person chooses to play tennis:
Q14SA3 marks
question figure
Q15SA3 marks
question figure
Comprehension passage - the questions below it refer to this
Based on the above data, answer the given subquestions. question figure
Q16MCQ2 marks
Which classifier has the lower training error?
  1. question figure
  2. question figure
Q17MCQ3 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure

Answer key

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

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. Linear Regression & Regularization

    • Ordinary Least Squares (OLS):

      • Minimizes ∑(yi−y^i)2\sum (y_i - \hat{y}_i)^2.
      • Closed-form solution: w=(XTX)−1XTyw = (X^T X)^{-1} X^T y.
    • Ridge Regression (L2 Regularization):

      • Loss: MSE+λ∑wj2\text{MSE} + \lambda \sum w_j^2.
      • Penalizes large coefficients (reduces overfitting).
      • Solution: w=(XTX+λI)−1XTyw = (X^T X + \lambda I)^{-1} X^T y.
    • Lasso Regression (L1 Regularization):

      • Loss: MSE+λ∑∣wj∣\text{MSE} + \lambda \sum |w_j|.
      • Forces sparse solutions (feature selection).
    • Key Equation:
Ridge: w=arg⁡min⁡w∥y−Xw∥22+λ∥w∥22\text{Ridge: } w = \arg\min_w \|y - Xw\|_2^2 + \lambda \|w\|_2^2
Lasso: w=arg⁡min⁡w∥y−Xw∥22+λ∥w∥1\text{Lasso: } w = \arg\min_w \|y - Xw\|_2^2 + \lambda \|w\|_1
  1. Logistic Regression

    • Sigmoid function: σ(z)=11+e−z\sigma(z) = \frac{1}{1 + e^{-z}}.
    • Decision boundary: y^=1\hat{y} = 1 if σ(wTx)>0.5\sigma(w^T x) > 0.5.
    • Key Equation:
P(y=1∣x)=σ(wTx)P(y=1|x) = \sigma(w^T x)
  1. Support Vector Machines (SVM)

    • Hard-Margin SVM:

      • Maximizes margin 2∥w∥\frac{2}{\|w\|}.
      • Constraints: yi(wTxi+b)≥1y_i(w^T x_i + b) \geq 1.
    • Soft-Margin SVM:

      • Allows misclassification with slack variables ξi\xi_i.
      • Primal problem:
min⁡w,b12∥w∥2+C∑ξis.t.yi(wTxi+b)≥1−ξi,ξi≥0\min_{w,b} \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. Decision Trees

    • Impurity Measures:

      • Entropy: H(S)=−∑pilog⁡2piH(S) = -\sum p_i \log_2 p_i.
      • Gini Index: G(S)=1−∑pi2G(S) = 1 - \sum p_i^2.
    • Splitting Criteria:

      • Information Gain (IG): IG=H(parent)−∑∣Sv∣∣S∣H(Sv)\text{IG} = H(\text{parent}) - \sum \frac{|S_v|}{|S|} H(S_v).
    • Stopping Conditions:

      • Node is pure (all samples same class, entropy = 0).
      • Max depth reached.
  1. Ensemble Methods

    • AdaBoost:

      • Combines weak learners (slightly better than random guessing).
      • Updates weights: Increase for misclassified samples.
      • Final predictor: H(x)=sign(∑αtht(x))H(x) = \text{sign}(\sum \alpha_t h_t(x)).
    • Key Equation:
αt=12ln⁡(1−ϵtϵt),ϵt=∑i=1nwiI(yi≠ht(xi))∑i=1nwi\alpha_t = \frac{1}{2} \ln \left( \frac{1 - \epsilon_t}{\epsilon_t} \right), \quad \epsilon_t = \frac{\sum_{i=1}^n w_i \mathbb{I}(y_i \neq h_t(x_i))}{\sum_{i=1}^n w_i}
  1. Perceptron Algorithm

    • Updates weights when misclassified: w←w+η(yi−y^i)xiw \leftarrow w + \eta (y_i - \hat{y}_i) x_i.
    • Converges if data is linearly separable.

B. Unsupervised Learning

  1. Clustering (Lloyd’s Algorithm / K-Means)

    • Steps:

      1. Initialize centroids randomly.
      2. Assign points to nearest centroid.
      3. Recompute centroids as mean of assigned points.
    • Key Equation:
Ck=1∣Ck∣∑x∈CkxC_k = \frac{1}{|C_k|} \sum_{x \in C_k} x
  1. Kernel PCA

    • Projects data into higher-dimensional space using kernel K(x,x′)K(x, x').
    • Polynomial Kernel: K(x,x′)=(xTx′+c)dK(x, x') = (x^T x' + c)^d.
    • Key Idea: Use kernel trick to avoid explicit transformation.

C. Probabilistic Models

  1. Naïve Bayes

    • Assumes feature independence given class: P(y∣x1,…,xn)∝P(y)∏P(xi∣y)P(y|x_1, \dots, x_n) \propto P(y) \prod P(x_i|y).
    • Prediction: y^=arg⁡max⁡yP(y)∏P(xi∣y)\hat{y} = \arg\max_y P(y) \prod P(x_i|y).
  1. Bayesian Inference

    • Prior: θ∼Beta(α,β)\theta \sim \text{Beta}(\alpha, \beta).
    • Posterior: θ∣data∼Beta(α+heads,β+tails)\theta | \text{data} \sim \text{Beta}(\alpha + \text{heads}, \beta + \text{tails}).
    • Posterior Mean: E[θ]=α+headsα+β+nE[\theta] = \frac{\alpha + \text{heads}}{\alpha + \beta + n}.

D. Neural Networks

  1. Single-Layer Neural Network

    • Activation Functions:

      • ReLU: ReLU(z)=max⁡(0,z)\text{ReLU}(z) = \max(0, z).
    • Forward Pass:

      • Hidden layer: h=ReLU(W(1)x+b(1))h = \text{ReLU}(W^{(1)} x + b^{(1)}).
      • Output: y^=W(2)h+b(2)\hat{y} = W^{(2)} h + b^{(2)}.

E. Dimensionality Reduction

  1. PCA vs. Kernel PCA

    • PCA: Linear projection to maximize variance.
    • Kernel PCA: Nonlinear projection using kernel functions.


2. Key Equations Summary

TopicEquation
Ridge Regressionw=(XTX+λI)−1XTyw = (X^T X + \lambda I)^{-1} X^T y
Lasso Regressionw=arg⁡min⁡w∥y−Xw∥22+λ∥w∥1w = \arg\min_w \|y - Xw\|_2^2 + \lambda \|w\|_1
Logistic RegressionP(y=1∣x)=11+e−wTxP(y=1|x) = \frac{1}{1 + e^{-w^T x}}
SVM (Primal)min⁡w,b12∥w∥2+C∑ξi\min_{w,b} \frac{1}{2}\|w\|^2 + C \sum \xi_i
SVM (Dual)max⁡α∑αi−12∑αiαjyiyjK(xi,xj)\max_\alpha \sum \alpha_i - \frac{1}{2} \sum \alpha_i \alpha_j y_i y_j K(x_i, x_j)
EntropyH(S)=−∑pilog⁡2piH(S) = -\sum p_i \log_2 p_i
Information GainIG=H(parent)−∑∣Sv∣∣S∣H(Sv)\text{IG} = H(\text{parent}) - \sum \frac{|S_v|}{|S|} H(S_v)
AdaBoost Weightαt=12ln⁡(1−ϵtϵt)\alpha_t = \frac{1}{2} \ln \left( \frac{1 - \epsilon_t}{\epsilon_t} \right)
K-Means CentroidCk=1∣Ck∣∑x∈CkxC_k = \frac{1}{|C_k|} \sum_{x \in C_k} x
Polynomial KernelK(x,x′)=(xTx′+c)dK(x, x') = (x^T x' + c)^d
Beta Posterior MeanE[θ]=α+headsα+β+nE[\theta] = \frac{\alpha + \text{heads}}{\alpha + \beta + n}


Graph 2: Unsupervised Learning

Graph 3: Probabilistic Models

Graph 4: Neural Networks

Graph 5: SVM Key Concepts



4. Exam-Specific Insights

  1. Regularization (Q2, Q4):

    • Ridge shrinks coefficients; Lasso performs feature selection.
    • Weight vectors:

      • w3w_3 (sparse) → Lasso.
      • w2w_2 (large coefficients) → Linear Regression.
      • w1w_1 (moderate coefficients) → Ridge.
  1. Decision Trees (Q3):

    • Pure node: All samples same class or entropy = 0.
  1. Clustering (Q5):

    • Recompute centroids after assignment to find new clusters.
  1. Kernel PCA (Q6):

    • Relationship x42=x1x2+x1x2x3x_4^2 = x_1 x_2 + x_1 x_2 x_3 suggests degree 3 polynomial kernel.
  1. AdaBoost (Q7, Q17, Q18):

    • Weak learners must perform better than random (error < 50%).
    • Lower training error → Higher weight in ensemble.
  1. Bias-Variance Tradeoff (Q8):

    • Model 1 (linear): High bias, low variance.
    • Model 2 (high-degree polynomial): Low bias, high variance.
  1. SVM Dual Problem (Q9):

    • αi=0\alpha_i = 0: Correctly classified.
    • 0<αi<C0 < \alpha_i < C: On margin.
    • αi=C\alpha_i = C: Misclassified or inside margin.
  1. Perceptron (Q10):

    • Converges for linearly separable data.
    • Final weight vector depends on update order.
  1. Kernel Regression (Q11):

    • Use kernel to transform features implicitly.
    • Prediction: ypred=w∗Tϕ(x′)y_{\text{pred}} = w^{*T} \phi(x').
  1. Bayesian Inference (Q12):

    • Posterior mean: α+headsα+β+n\frac{\alpha + \text{heads}}{\alpha + \beta + n}.
  1. Neural Networks (Q13):

    • ReLU: ReLU(z)=max⁡(0,z)\text{ReLU}(z) = \max(0, z).
    • Output: Linear combination of hidden layer activations.
  1. Naïve Bayes (Q14):

    • Compute P(Yes∣Features)∝P(Yes)∏P(Featurei∣Yes)P(\text{Yes}|\text{Features}) \propto P(\text{Yes}) \prod P(\text{Feature}_i|\text{Yes}).
  1. Logistic Regression (Q15):

    • Predict y^=1\hat{y} = 1 if σ(wTx)>0.55\sigma(w^T x) > 0.55.
  1. SVM Prediction (Q16):

    • Dual solution α∗\alpha^* defines support vectors.
    • Prediction: sign(∑αiyiK(xi,xtest)+b)\text{sign}(\sum \alpha_i y_i K(x_i, x_{\text{test}}) + b).