ML Study Hub

Home / Past papers / MLT End Term / this paper

IIT M DIPLOMA AN EXAM QDD4 13 Apr 2025 - 13 Apr 2025

MLT End Term17 questions50 marks6 MCQ · 6 SA · 5 MSQDiploma / afternoon / QDD4
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, followed by Mermaid knowledge graphs to visualize relationships.



1. Core Topics & Concepts

A. Supervised Learning

  1. Linear Regression & Regularization

    • Ordinary Least Squares (OLS): Minimizes ∥Xw−y∥2\|Xw - y\|^2.
    • Ridge Regression (L2):

      • Loss: ∥Xw−y∥2+λ∥w∥2\|Xw - y\|^2 + \lambda \|w\|^2.
      • Role of regularization: Penalizes large coefficients to reduce overfitting (Q2).
      • Weight vector: Coefficients are shrunk but rarely zero.
    • Lasso Regression (L1):

      • Loss: ∥Xw−y∥2+λ∥w∥1\|Xw - y\|^2 + \lambda \|w\|_1.
      • Feature selection: Forces some coefficients to zero (sparse solution) (Q4).
    • Key Equation:
wridge=(XTX+λI)−1XTyw_{\text{ridge}} = (X^T X + \lambda I)^{-1} X^T y
  1. Logistic Regression

    • Sigmoid function: σ(z)=11+e−z\sigma(z) = \frac{1}{1 + e^{-z}}.
    • Decision boundary: Predict y^=1\hat{y} = 1 if P(y=1∣x)>thresholdP(y=1|x) > \text{threshold} (e.g., 0.55 in Q15).
    • Key Equation:
P(y=1∣x)=σ(wTx),where w is the weight vector.P(y=1|x) = \sigma(w^T x), \quad \text{where } w \text{ is the weight vector.}
  1. Support Vector Machines (SVM)

    • Hard-Margin SVM: Maximizes margin 2∥w∥\frac{2}{\|w\|} with no misclassifications.
    • Soft-Margin SVM: Allows misclassifications (slack variables ξi\xi_i) with penalty CC.

      • 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: ΔH=H(S)−∑∣Sv∣∣S∣H(Sv)\Delta H = H(S) - \sum \frac{|S_v|}{|S|} H(S_v).
    • Pure Node: All samples belong to the same class (H(S)=0H(S) = 0) (Q3).
  1. Model Evaluation

    • Bias-Variance Tradeoff (Q8):

      • High Bias (Underfitting): Model 1 (linear) has higher bias than Model 2 (polynomial).
      • High Variance (Overfitting): Complex models (e.g., high-degree polynomials) fit noise.
    • Weak Learners (Q7): Slightly better than random guessing (used in boosting).

B. Unsupervised Learning

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

    • Steps:

      1. Initialize centroids.
      2. Assign points to nearest centroid.
      3. Recompute centroids as mean of assigned points.
    • Convergence: Centroids stabilize (Q5).
    • Distance Metric: Typically Euclidean distance.
  1. Dimensionality Reduction

    • PCA: Linear projection to maximize variance.
    • Kernel PCA: Non-linear projection via kernel trick (Q6).

      • Polynomial Kernel: K(x,x′)=(xTx′+c)dK(x, x') = (x^T x' + c)^d.
      • Example: For x42=x1x2+x1x2x3x_4^2 = x_1 x_2 + x_1 x_2 x_3, use degree-3 kernel.

C. Ensemble Methods

  1. AdaBoost

    • Algorithm:

      1. Initialize weights Di=1ND_i = \frac{1}{N}.
      2. Train weak learner hth_t, compute error ϵt\epsilon_t.
      3. Update weights: Di←Diβt1−yiht(xi)D_i \leftarrow D_i \beta_t^{1-y_i h_t(x_i)}, where βt=ϵt1−ϵt\beta_t = \frac{\epsilon_t}{1-\epsilon_t}.
      4. Combine classifiers: H(x)=sign(∑αtht(x))H(x) = \text{sign}\left( \sum \alpha_t h_t(x) \right), where αt=log⁡1−ϵtϵt\alpha_t = \log \frac{1-\epsilon_t}{\epsilon_t}.
    • Error Calculation (Q17, Q18):

      • Lower error classifier gets higher weight (e.g., h1h_1 in Q18).
      • Final classifier: h∗(x)=sign(αh1(x))h^*(x) = \text{sign}(\alpha h_1(x)).
  1. Bagging vs. Boosting:

    • Bagging (e.g., Random Forest): Reduces variance by averaging independent models.
    • Boosting (e.g., AdaBoost): Reduces bias by sequentially correcting errors.

D. Probabilistic Models

  1. Naïve Bayes

    • Assumption: Features are conditionally independent given the class.
    • Prediction:
P(y∣X)∝P(y)∏P(xi∣y).P(y|X) \propto P(y) \prod P(x_i|y).
  1. Bayesian Inference

    • Beta-Binomial Model (Q12):

      • Prior: Beta(α,β)\text{Beta}(\alpha, \beta).
      • Posterior: Beta(α+heads,β+tails)\text{Beta}(\alpha + \text{heads}, \beta + \text{tails}).
      • Posterior Mean: α+headsα+β+n\frac{\alpha + \text{heads}}{\alpha + \beta + n}.
      • Example: For 150 heads in 1000 flips with Beta(10,40)\text{Beta}(10, 40) prior:
Posterior mean=10+15010+40+1000=1601050≈0.152.\text{Posterior mean} = \frac{10 + 150}{10 + 40 + 1000} = \frac{160}{1050} \approx 0.152.

E. Neural Networks

  1. Single-Layer Perceptron

    • Activation: Step function (for classification) or ReLU (for regression).
    • Training: Update weights via perceptron rule w←w+η(y−y^)xw \leftarrow w + \eta (y - \hat{y})x.
    • Convergence: Guaranteed if data is linearly separable (Q10).
  1. Multi-Layer Perceptron (MLP)

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

      • Hidden layer: h1=ReLU(w1(1)x1+w2(1)x2)h_1 = \text{ReLU}(w_1^{(1)} x_1 + w_2^{(1)} x_2), h2=ReLU(w1(2)x1+w2(2)x2)h_2 = \text{ReLU}(w_1^{(2)} x_1 + w_2^{(2)} x_2).
      • Output: y^=uoutTh\hat{y} = u_{out}^T h.

F. Kernel Methods

  1. Kernel Regression

    • Dual Form: w∗=Φ(X)αw^* = \Phi(X) \alpha, where Φ\Phi is the feature map.
    • Prediction (Q11):
ypred=(w∗)Tϕ(x′)=αTK(X,x′).y_{\text{pred}} = (w^*)^T \phi(x') = \alpha^T K(X, x').
K(x,x′)=(xTx′+1)2=(x1x1′+x2x2′+x3x3′+1)2.K(x, x') = (x^T x' + 1)^2 = (x_1 x_1' + x_2 x_2' + x_3 x_3' + 1)^2.
  1. SVM Kernels:

    • Linear, polynomial, RBF, etc.

2. Key Equations Summary

TopicEquation
Ridge Regressionw=(XTX+λI)−1XTyw = (X^T X + \lambda I)^{-1} X^T y
Lasso Regressionmin⁡∥Xw−y∥2+λ∥w∥1\min \|Xw - y\|^2 + \lambda \|w\|_1
Logistic RegressionP(y=1∣x)=σ(wTx)P(y=1|x) = \sigma(w^T x)
SVM Primalmin⁡12∥w∥2+C∑ξi\min \frac{1}{2} \|w\|^2 + C \sum \xi_i
SVM Dualmax⁡∑αi−12∑αiαjyiyjK(xi,xj)\max \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 GainΔH=H(S)−∑∣Sv∣∣S∣H(Sv)\Delta H = H(S) - \sum \frac{|S_v|}{|S|} H(S_v)
AdaBoost Weight UpdateDi←Diβt1−yiht(xi)D_i \leftarrow D_i \beta_t^{1-y_i h_t(x_i)}
AdaBoost Final ModelH(x)=sign(∑αtht(x))H(x) = \text{sign}\left( \sum \alpha_t h_t(x) \right)
Beta Posterior Meanα+successesα+β+n\frac{\alpha + \text{successes}}{\alpha + \beta + n}
Kernel Regressionypred=αTK(X,x′)y_{\text{pred}} = \alpha^T K(X, x')
PCAMaximize wTXTXw\text{Maximize } w^T X^T X w s.t. ∥w∥=1\|w\| = 1
Perceptron Updatew←w+η(y−y^)xw \leftarrow w + \eta (y - \hat{y})x
ReLU ActivationReLU(z)=max⁡(0,z)\text{ReLU}(z) = \max(0, z)

Graph 2: Unsupervised Learning Relationships

Graph 3: Ensemble Methods

Graph 4: Probabilistic Models

Graph 5: Neural Networks

Graph 6: Model Evaluation


4. Exam Tips

  1. Regularization (Q2, Q4):

    • Ridge: Shrinks coefficients (never zero).
    • Lasso: Sparse coefficients (some zero).
    • Match weight vectors: Large values → Linear/Ridge; sparse → Lasso.
  1. Decision Trees (Q3):

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

    • Recompute centroids after assignment, then reassign points.
  1. Kernel PCA (Q6):

    • Match kernel degree to data relationship (e.g., x42=x1x2+x1x2x3x_4^2 = x_1 x_2 + x_1 x_2 x_3 → degree 3).
  1. Bias-Variance (Q8):

    • Simpler model (Model 1) → higher bias, underfits.
    • Complex model (Model 2) → higher variance, may overfit.
  1. SVM (Q9, Q16):

    • αi∗=0\alpha_i^* = 0: Correctly classified.
    • 0<αi∗<C0 < \alpha_i^* < C: On margin.
    • αi∗=C\alpha_i^* = C: Misclassified or margin violator.
    • Prediction: sign(∑αi∗yiK(xi,xtest)+b)\text{sign}(\sum \alpha_i^* y_i K(x_i, x_{\text{test}}) + b).
  1. AdaBoost (Q17, Q18):

    • Choose classifier with lower error.
    • Update weights: Increase for misclassified samples.
    • Final model: Weighted sign of selected classifier.
  1. Naïve Bayes (Q14):

    • Use Laplace smoothing if zero probabilities occur.
    • Multiply conditional probabilities for prediction.
  1. Bayesian Inference (Q12):

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

    • ReLU: max(0,z)\text{max}(0, z).
    • Forward pass: Compute hidden layer, then output.
  1. Kernel Regression (Q11):

    • Predict using αTK(X,x′)\alpha^T K(X, x').
    • Expand kernel explicitly for polynomial cases.
  1. Perceptron (Q10):

    • Converges if data is linearly separable.
    • Update weights iteratively for misclassified points.