ML Study Hub

Home / Past papers / MLT End Term / this paper

IIT M DIPLOMA ET1 EXAM QPD1 S1 03 Sep - 03 Sep 2023

MLT End Term17 questions100 marks8 MSQ · 5 SA · 4 MCQDiploma / QPD1
Elapsed 00:00
Q1SA6 marks
question figure
Q2SA6 marks
question figure
Q3SA6 marks
Hint: Assume that these are only two possible words (that is there are only two features) question figure
Q4MSQ6 marksselect all that apply
question figure
  1. question figure
  2. question figure
  3. question figure
Q5MSQ6 marksselect all that apply
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q6MSQ6 marksselect all that apply
Which of the following statements is/are true?
  1. Ridge regression and Lasso regression both puts a limit on the length ofweight vector.
  2. Ridge regression puts limit on length of the weight vector but LASSOregression does not put a limit on weight vector length.
  3. When many features are redundant, then LASSO regression is moreappropriate than ridge regression and linear regression as LASSO regression produces sparseweights for those features.
  4. When many features are redundant, then linear regression is moreappropriate than ridge regression and LASSO regression
Q7MSQ6 marksselect all that apply
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q8MSQ6 marksselect all that apply
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
  5. question figure
Q9MSQ6 marksselect all that apply
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
  5. question figure
Q10MCQ6 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q11MCQ6 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q12MCQ6 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q13MCQ6 marks
question figure
  1. question figure
  2. question figure
  3. question figure
  4. question figure
Q14SA5 marks
question figure
Q15MSQ3 marksselect all that apply
Which of the following statements is/are true about the K-NN algorithm?
  1. K-NN is sensitive to outliers in the dataset.
  2. K-NN is a supervised learning algorithm used for classification.
  3. K-NN assigns class labels to new instances based on a decision boundary learned from thetraining data.
  4. The training dataset is not required while predicting the label of a test-point inthe K-NN algorithm.
Q16MSQ7 marksselect all that apply
question figure
  1. The values of 0-1 loss function will be 3
  2. The values of squared loss will be equals to 2.14
  3. The values of 0-1 loss equals 4.
  4. The values of squared loss will be equals to 3.14
Q17SA7 marks
question figure

Answer key

  1. Q1 (SA, 6 marks): 34
  2. Q2 (SA, 6 marks): 0.120 to 0.180
  3. Q3 (SA, 6 marks): 0.98 to 1
  4. Q4 (MSQ, 6 marks): A, B
  5. Q5 (MSQ, 6 marks): A, C, D
  6. Q6 (MSQ, 6 marks): A, C
  7. Q7 (MSQ, 6 marks): B, D
  8. Q8 (MSQ, 6 marks): B, C
  9. Q9 (MSQ, 6 marks): B, C, D
  10. Q10 (MCQ, 6 marks): A
  11. Q11 (MCQ, 6 marks): A
  12. Q12 (MCQ, 6 marks): D
  13. Q13 (MCQ, 6 marks): D
  14. Q14 (SA, 5 marks): 0.10 to 0.60
  15. Q15 (MSQ, 3 marks): A, B
  16. Q16 (MSQ, 7 marks): B, C
  17. Q17 (SA, 7 marks): 0.60 to 0.80

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. Dimensionality Reduction (PCA)

Key Equation:

Variance=λ1+λ2+...+λd\text{Variance} = \lambda_1 + \lambda_2 + ... + \lambda_d

B. Bayesian Estimation

α′=α+successes,β′=β+failures\alpha' = \alpha + \text{successes}, \quad \beta' = \beta + \text{failures}
Mean=α′α′+β′\text{Mean} = \frac{\alpha'}{\alpha' + \beta'}

Key Equation:

P(θ∣data)=Beta(α+successes,β+failures)P(\theta | \text{data}) = \text{Beta}(\alpha + \text{successes}, \beta + \text{failures})

C. Naive Bayes Classifier

P(y∣x1,...,xn)∝P(y)∏i=1nP(xi∣y)P(y | x_1, ..., x_n) \propto P(y) \prod_{i=1}^n P(x_i | y)

Key Equation:

y^=arg max⁡yP(y)∏i=1nP(xi∣y)\hat{y} = \argmax_y P(y) \prod_{i=1}^n P(x_i | y)

D. Gram Matrix & Kernel Methods

Key Check: For a matrix KK to be a Gram matrix:

  1. K=KTK = K^T.
  2. All eigenvalues ≥0\geq 0.

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

Key Insight: Points closer to existing cluster centroids (e.g., [0,0]T[0, 0]^T) are likely in the same cluster.


F. Regularization (Ridge vs. Lasso)

AspectRidge (L2)Lasso (L1)
Penaltyλ∑wj2\lambda \sum w_j^2λ∑∣wj∣\lambda \sum |w_j|
EffectShrinks weightsShrinks + sets weights to 0 (sparse)
Use CaseMulticollinearityFeature selection

Key Equations:

Ridge: min⁡∥y−Xw∥22+λ∥w∥22\text{Ridge: } \min \|y - Xw\|_2^2 + \lambda \|w\|_2^2
Lasso: min⁡∥y−Xw∥22+λ∥w∥1\text{Lasso: } \min \|y - Xw\|_2^2 + \lambda \|w\|_1

G. Support Vector Machines (SVM)

min⁡w,b,ξ12∥w∥2+C∑ξis.t.yi(wTxi+b)≥1−ξi,ξi≥0\min_{w, b, \xi} \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
max⁡α∑αi−12∑i,jαiαjyiyjxiTxjs.t.0≤αi≤C,∑αiyi=0\max_\alpha \sum \alpha_i - \frac{1}{2} \sum_{i,j} \alpha_i \alpha_j y_i y_j x_i^T x_j \quad \text{s.t.} \quad 0 \leq \alpha_i \leq C, \sum \alpha_i y_i = 0

Key Insights:


H. Random Forest

Key Trade-offs: | pp (Features) | Correlation | Bias | Variance | |------------------------|----------------|----------|--------------| | Small | Low | High | Low | | Large | High | Low | High |


I. Linear Regression

w=(XTX)−1XTyw = (X^T X)^{-1} X^T y

Key Equation:

w=arg min⁡w∥y−Xw∥22w = \argmin_w \|y - Xw\|_2^2

J. Perceptron Algorithm

w←w+ηyixi,b←b+ηyiw \leftarrow w + \eta y_i x_i, \quad b \leftarrow b + \eta y_i

Key Insight:


K. Optimization (Lagrangian)

L(w,α)=f(w)+αg(w)L(w, \alpha) = f(w) + \alpha g(w)

Key Equation:

max⁡α≥0L(w′,α)={f(w′)if g(w′)≤0∞otherwise\max_{\alpha \geq 0} L(w', \alpha) = \begin{cases} f(w') & \text{if } g(w') \leq 0 \\ \infty & \text{otherwise} \end{cases}

L. Decision Trees

IG=H(parent)−∑NjNH(childj)IG = H(\text{parent}) - \sum \frac{N_j}{N} H(\text{child}_j)

where HH is entropy:

H(S)=−∑pilog⁡2piH(S) = - \sum p_i \log_2 p_i

Key Equation:

IG(feature)=H(target)−H(target∣feature)IG(\text{feature}) = H(\text{target}) - H(\text{target} | \text{feature})

M. K-Nearest Neighbors (K-NN)

Key Insight:


N. Loss Functions

Loss FunctionEquationUse Case
0-1 LossI(y≠y^)\mathbb{I}(y \neq \hat{y})Classification accuracy
Squared Loss(y−y^)2(y - \hat{y})^2Regression (e.g., MSE)
Cross-Entropy−∑yilog⁡y^i-\sum y_i \log \hat{y}_iProbabilistic classification

Key Equations:

0-1 Loss=∑i=1nI(yi≠y^i)\text{0-1 Loss} = \sum_{i=1}^n \mathbb{I}(y_i \neq \hat{y}_i)
Squared Loss=∑i=1n(yi−y^i)2\text{Squared Loss} = \sum_{i=1}^n (y_i - \hat{y}_i)^2

O. Neural Networks

z(l)=W(l)a(l−1)+b(l),a(l)=σ(z(l))z^{(l)} = W^{(l)} a^{(l-1)} + b^{(l)}, \quad a^{(l)} = \sigma(z^{(l)})

where σ\sigma is the activation function (e.g., sigmoid, ReLU).

σ(z)=11+e−z\sigma(z) = \frac{1}{1 + e^{-z}}

Key Equation:

a(l)=σ(W(l)a(l−1)+b(l))a^{(l)} = \sigma(W^{(l)} a^{(l-1)} + b^{(l)})


Graph 2: Dimensionality Reduction & Clustering

Graph 3: Optimization & Model Training

Graph 4: Bayesian vs. Frequentist

Graph 5: Ensemble Methods


3. Key Equations Summary

TopicEquation
PCA VarianceVariance=∑i=1dλi\text{Variance} = \sum_{i=1}^d \lambda_i
Bayesian Posteriorα′=α+successes,β′=β+failures\alpha' = \alpha + \text{successes}, \beta' = \beta + \text{failures}
Naive Bayesy^=arg max⁡yP(y)∏P(xi∣y)\hat{y} = \argmax_y P(y) \prod P(x_i | y)
SVM Primalmin⁡12∥w∥2+C∑ξi\min \frac{1}{2} \|w\|^2 + C \sum \xi_i
SVM Dualmax⁡α∑αi−12∑αiαjyiyjxiTxj\max_\alpha \sum \alpha_i - \frac{1}{2} \sum \alpha_i \alpha_j y_i y_j x_i^T x_j
Information GainIG=H(S)−∑∣Sv∣∣S∣H(Sv)IG = H(S) - \sum \frac{|S_v|}{|S|} H(S_v)
Perceptron Updatew←w+ηyixiw \leftarrow w + \eta y_i x_i if misclassified
LagrangianL(w,α)=f(w)+αg(w)L(w, \alpha) = f(w) + \alpha g(w)
Linear Regressionw=(XTX)−1XTyw = (X^T X)^{-1} X^T y
Ridge/Lassomin⁡∥y−Xw∥22+λ∥w∥1/22\min \|y - Xw\|_2^2 + \lambda \|w\|_{1/2}^2
0-1 Loss∑I(yi≠y^i)\sum \mathbb{I}(y_i \neq \hat{y}_i)
Squared Loss∑(yi−y^i)2\sum (y_i - \hat{y}_i)^2
Sigmoidσ(z)=11+e−z\sigma(z) = \frac{1}{1 + e^{-z}}

4. Exam Tips

  1. PCA: Always check eigenvalues for variance and eigenvectors for principal components.
  2. Bayesian: Remember to add successes/failures to α/β\alpha/\beta.
  3. Naive Bayes: Multiply conditional probabilities (assume independence).
  4. SVM: αi=0\alpha_i = 0 implies correct classification outside margin.
  5. Random Forest: Lower pp reduces correlation but may underfit.
  6. Perceptron: Only update weights if misclassified.
  7. Decision Trees: Calculate entropy and information gain for splits.
  8. K-NN: Normalize features and choose kk carefully (odd for binary classification).
  9. Loss Functions: 0-1 loss counts misclassifications; squared loss penalizes large errors.
  10. Neural Networks: Forward propagation is layer-by-layer activation.