Regression · Machine Learning
6 questions · asked in 3 of 3 years (2024–2026)
MCQ 2 · MSQ 1 · NAT 31-mark 4 · 2-mark 2
2024Questions per year2026
Questions 1–5 of 6
In the following table, the Task column lists a few tasks related to machine learning. The Algorithm column lists a few algorithms.
Each entry "t" from the Task column is to be matched with an appropriate entry "a" from the Algorithm column such that the task "t" can be solved using the algorithm "a". Denote such a match as t : a
Which of the following options is/are the correct matching(s)?
Each entry "t" from the Task column is to be matched with an appropriate entry "a" from the Algorithm column such that the task "t" can be solved using the algorithm "a". Denote such a match as t : a
Which of the following options is/are the correct matching(s)?
One or more options are correct.
Answer: (B)
Match each algorithm with what it does:
- K-Medoid (A2) groups unlabeled points around medoids, so it is a clustering method: T1:A2.
- Naive Bayes (A4) uses Bayes' rule with labeled data to predict a class, so it is a classifier: T2:A4.
- Markov Chain Monte Carlo (A1) draws random samples from a distribution, so it is used for sampling: T3:A1.
- Linear Discriminant Analysis (A3) finds directions that best separate the classes, so it gives a lower-dimensional set of features: feature extraction, T4:A3.
This gives T1:A2, T2:A4, T3:A1, T4:A3, which is option (B). The other options each put a wrong algorithm against a task:
- (A) and (D) use Naive Bayes for clustering (T1:A4), but it is a supervised classifier.
- (A) and (C) use K-Medoid for feature extraction (T4:A2), but it only clusters.
- (C) uses LDA for clustering (T1:A3), and (D) uses K-Medoid for classification (T2:A2), but neither is meant for that.
Answer: (B)
- K-Medoid (A2) groups unlabeled points around medoids, so it is a clustering method: T1:A2.
- Naive Bayes (A4) uses Bayes' rule with labeled data to predict a class, so it is a classifier: T2:A4.
- Markov Chain Monte Carlo (A1) draws random samples from a distribution, so it is used for sampling: T3:A1.
- Linear Discriminant Analysis (A3) finds directions that best separate the classes, so it gives a lower-dimensional set of features: feature extraction, T4:A3.
This gives T1:A2, T2:A4, T3:A1, T4:A3, which is option (B). The other options each put a wrong algorithm against a task:
- (A) and (D) use Naive Bayes for clustering (T1:A4), but it is a supervised classifier.
- (A) and (C) use K-Medoid for feature extraction (T4:A2), but it only clusters.
- (C) uses LDA for clustering (T1:A3), and (D) uses K-Medoid for classification (T2:A2), but neither is meant for that.
Answer: (B)
Consider that for a supervised learning task, the objective function being minimized is , where is the input and is the parameter. Stochastic Gradient Descent with learning rate of is used for parameter updates.
Suppose that at the end of iteration , the value of becomes .
Let be the input for iteration .
The value of at the end of iteration ( ) is ________. (Rounded off to two decimal places)
Suppose that at the end of iteration , the value of becomes .
Let be the input for iteration .
The value of at the end of iteration ( ) is ________. (Rounded off to two decimal places)
Answer: 8.9 to 9.1
The objective function is . Its gradient with respect to is just , because differentiated with respect to gives this.
The SGD update rule is: .
Here we have , learning rate , and for this update:
Answer: 9.00
The SGD update rule is: .
Here we have , learning rate , and for this update:
Answer: 9.00
Which of the following statements is true for Ridge Regression?
Answer: (D)
Ridge Regression puts an penalty on the loss function. This penalty is the squared size of the weights. It does not use . So the option with the -norm is wrong. It also does not aim at parameters that have negative values.
The regularizer is there to guard against overfitting, which is the opposite of what the first option says. An overfit model works well on the training data but poorly on test data. The first option describes a model that works well on test data but poorly on training data, so it is wrong.
The main effect of this penalty is the well-known bias-variance tradeoff. The weights shrink towards zero. The model then fits the training data a little less perfectly, so bias goes up. But the model reacts much less to small changes in the training data, so variance goes down. This is usually a gain for generalization, most of all when the model without regularization would overfit.
Answer: (D)
The regularizer is there to guard against overfitting, which is the opposite of what the first option says. An overfit model works well on the training data but poorly on test data. The first option describes a model that works well on test data but poorly on training data, so it is wrong.
The main effect of this penalty is the well-known bias-variance tradeoff. The weights shrink towards zero. The model then fits the training data a little less perfectly, so bias goes up. But the model reacts much less to small changes in the training data, so variance goes down. This is usually a gain for generalization, most of all when the model without regularization would overfit.
Answer: (D)
Consider that Linear Ridge Regression is being used to learn a prediction function , where and Mean Absolute Error (MAE) is used to measure the prediction error. A weight of is associated with the regularizer.
At an intermediate step of the training process, assume that the parameter . In the next step, for the input , the predicted value of is noted. Let the relation between and the true value of be .
The value of the overall regularized loss function for this instance is ________. (Rounded off to two decimal places)
At an intermediate step of the training process, assume that the parameter . In the next step, for the input , the predicted value of is noted. Let the relation between and the true value of be .
The value of the overall regularized loss function for this instance is ________. (Rounded off to two decimal places)
Answer: 6.9 to 7.1
Predicted value:
True value:
MAE for this one instance:
Regularizer term (Ridge takes the squared norm of the weights and multiplies it by the given weight ):
Total regularized loss:
Answer: 7.00
True value:
MAE for this one instance:
Regularizer term (Ridge takes the squared norm of the weights and multiplies it by the given weight ):
Total regularized loss:
Answer: 7.00
Given data of the form , we fit a model using linear least-squares regression. The optimal value of is ________(Round off to three decimal places)
Answer: 0.285 to 0.287
Model has no intercept, so the least-squares weight is
Answer: 0.286
Answer: 0.286
Keep practising