MLT Quiz 2: 3 December 2023 (September 2023 term)
The IIT Madras BS Machine Learning Techniques (MLT) Quiz 2 paper sat on 3 Dec 2023, in the September 2023 term: 14 questions for 50 marks in 120 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.
- 14
- 50
- 120 min
- 8
- 3
- 3
Show answer
Correct answer: 0
Question 2
Suppose we transform the data points using a mapping . Assume there exists a kernel matrix for the mapping . Moreover, we categorize the model as parametric and non-parametric according to the following definitions.
- Parametric: The samples in the training set are not necessary for making predictions on a test sample
- non-Parametric: All the samples in the training set are necessary for making predictions on a test sample
Check all that is true about the kernel regression.
The kernel regression is parametric
The kernel regression is non-parametric
The Kernel matrix K is positive semi-definite
In general, Kernel regression is computationally expensive than a simple linear regression
Show answer
Correct answers
The kernel regression is non-parametric
The Kernel matrix K is positive semi-definite
In general, Kernel regression is computationally expensive than a simple linear regression
Question 3
The team modifies the relation as where . Suppose that , and . Assume that for . What is the negative log-likelihood of the dataset at ? Use logarithm to base .
Show answer
Correct answer: 39.5 (accepted within ±0.5)
Question 4
In a Ridge regression scenario with the following dataset:
And the corresponding target vector:
The regularization parameter is set at . Calculate the ratio of the Maximum Likelihood Estimate (MLE) weight vector to the Ridge weight vector and select the correct range.
(1.05, 1.20)
(0.85, 0.95)
(1,1)
(3, 3.5)
Show answer
Correct answer
(1.05, 1.20)
Question 5
Which of the following is/are the primary advantages of using L1 regularization
L1 regularization reduces the risk of overfitting.
L1 regularization tends to produce sparse models.
L1 regularization always improves the model’s predictive accuracy on large datasets.
L1 regularization is primarily used to increase model complexity.
Show answer
Correct answers
L1 regularization reduces the risk of overfitting.
L1 regularization tends to produce sparse models.
Question 6
Select all the statements that are true about decision trees and k-Nearest Neighbors (k-NN) in machine learning:
Decision trees are a supervised learning algorithm used for classifications.
The k-NN algorithm is a lazy learner, which means it doesn’t build an explicit model during the training phase.
In k-NN, the value of k represents the number of features used for classification.
k-Nearest Neighbors (k-NN) is a parametric model that requires estimating probability distributions.
The depth of the tree is a hyperparameter and is typically chosen using cross- validation.
Show answer
Correct answers
Decision trees are a supervised learning algorithm used for classifications.
The k-NN algorithm is a lazy learner, which means it doesn’t build an explicit model during the training phase.
The depth of the tree is a hyperparameter and is typically chosen using cross- validation.
Question 7
Consider that the three weight vectors , and are learned for an eight-dimensional dataset using different regression models (Not in any particular order).
Select the most appropriate match for these weight vectors.
w1 → Lasso regression, w2 → Linear regression, w3 → Ridge regression
w1→ Ridge regression, w2 → Lasso regression, w3 → Linear regression
w1 → Linear regression, w2 → Ridge regression, w3 → Lasso regression
w1 → Ridge regression, w2 → Linear regression, w3 → Lasso regression
Show answer
Correct answer
w1 → Lasso regression, w2 → Linear regression, w3 → Ridge regression
Question 8
Given a design matrix and a target vector , where represents the number of features, represents the number of data points, and the data is defined as:
Calculate the coefficients for Ridge regression with .
β = [0.75, 0.75]
β = [1, 0.5]
β = [0.5, 1]
β = [0.85, 0.12]
None of these
Show answer
Correct answer
β = [0.85, 0.12]
Question 9
You are working on a decision tree algorithm to classify whether a bank loan applicant will default on their loan based on several financial factors. The dataset includes Credit Score, Annual Income, Loan Amount, Loan Term as features.
The target variable is binary: 1 for ”Default” and 0 for ”No Default.”
You have a dataset of 500 loan applicants, and you want to construct a decision tree to predict loan default. To determine the first split (root node), you'll use the information gain as the criterion. Here’s the distribution of loan default in the dataset:
Default: 150 applicants No Default: 350 applicants
Calculate the Entropy for the initial dataset.
Show answer
Correct answer: 0.875 (accepted within ±0.045)
Question 10
Consider the problem of classifying an input text as positive sentiment or negative sentiment. For example, the text “I am happy” is positive and the text “ I am a bit worried” is negative. The dictionary that is used to encode the text into a vector contains 12 words. Suppose we prefer to use a generative learning algorithm that estimates the joint probability , where and . Assume that the features in a sample are not independent given the label. How many parameters do we need to estimate from the given data? (Enter -1 if you think the given information is insufficient to find the answer)
Show answer
Correct answer: 8191
Question 11
Given a training dataset with 100 data points, how many distances would we have to compute in the process of predicting the label of test-point in the k-NN algorithm with k = 5
Show answer
Correct answer: 100
Question 12
If the proportion of points belonging to class 1 in a node is p, for what value of p is the node’s entropy maximum?
Show answer
Correct answer: 0.5
Question 13
Consider the following dataset with 6 samples along with the corresponding labels. Each sample has three binary features and .
| sample | ||||
|---|---|---|---|---|
| 1 | 1 | 0 | 1 | |
| 0 | 1 | 0 | 1 | |
| 1 | 0 | 0 | 0 | |
| 0 | 0 | 1 | 0 | |
| 1 | 0 | 1 | 0 | |
| 1 | 1 | 1 | 1 |
Assume that the features are conditionally independent given the label . Suppose the test sample is .
Based on the above data answer the given subquestions.
Show answer
Correct answer: 0
Question 14
Consider the following dataset with 6 samples along with the corresponding labels. Each sample has three binary features and .
| sample | ||||
|---|---|---|---|---|
| 1 | 1 | 0 | 1 | |
| 0 | 1 | 0 | 1 | |
| 1 | 0 | 0 | 0 | |
| 0 | 0 | 1 | 0 | |
| 1 | 0 | 1 | 0 | |
| 1 | 1 | 1 | 1 |
Assume that the features are conditionally independent given the label . Suppose the test sample is .
Based on the above data answer the given subquestions.
What will be the predicted label according to the Naive Bayes decision rule?
Show answer
Correct answer: 1
