20 questions · 49 marks · 4 papers. Try each one before checking.
Solve them and check answers →Read the notes first
Aug 2023 (day not given)
Question Q3 MCQ · 4 marks
The training dataset for a binary classification problem is as follows: $\{(u,1),(-u,0),(2u,1),(-2u,0)\}$ where $u\in\mathbb R^d$ is a non zero constant and each element is a data-point of the form $(x_i,y_i)$. The labels lie in $\{0,1\}$. Consider a linear classifier with weight vector $w$. What condition should the weight vector satisfy for the zero-one loss to be zero on this dataset?
- $w^Tu<0$
- $w^Tu>0$
- $w^Tu=0$
- We can never find a $w$ for which the zero-one loss becomes zero on this dataset.
Apr 2026 (06 Apr)
Question Q6 MSQ · 3 marks
Figure (described in the bank): four datasets; red circles have label $-1$, green squares $+1$. Dataset-1: red $(-1,1),(1,-1)$; green $(1,1),(-1,-1)$ (XOR). Dataset-2: red $(-1,1),(1,1),(-1,-1),(1,-1)$; green $(0,0)$. Dataset-3: red $(-2,1),(1,-2)$; green $(-0.5,1),(1,1)$. Dataset-4: red $(-1,1),(2,1)$; green $(-1,-1),(1,-2)$.
A dataset is said to be linearly separable if we can find a linear classifier that achieves zero error for that dataset. Select all linearly separable datasets. The options are independent of each other. We are not looking for a single classifier that will work for multiple options.
- Dataset-1
- Dataset-2
- Dataset-3
- Dataset-4
Mar 2024 (24 Mar)
Question Q18 MCQ · 4 marks
The training dataset for a binary classification problem is as follows: $\{(u,1),(-2u,0),(3u,1),(-4u,0)\}$ where $u\in\mathbb R^d$ is a constant, and the labels belong to $\{0,1\}$. Let $w$ be the weight vector of a linear classifier. What condition should the weight vector satisfy for the zero-one loss to be zero on this dataset?
- $w^Tu<0$
- $w^Tu>0$
- $w^Tu=0$
- We can never find a $w$ for which the zero-one loss becomes zero on this dataset.
Question Q19 MSQ · 4 marks
Figure (described in the bank): axes $x_1,x_2$; a linear boundary through the origin; $w$ perpendicular to it pointing into the first quadrant. $x_4$ lies on the boundary; $x_5$ on the negative side along the negative $x_1$-axis; $x_1$ in the second quadrant just on the positive side; $x_2$ in the first quadrant further along $w$ than $x_1$; $x_3$ further along $w$ than $x_2$.
Consider the following data-points in a binary classification problem. $w$ is the weight vector corresponding to a linear classifier. The labels are $+1$ and $-1$. Which of the following statements are true?
- $0<w^Tx_1<w^Tx_2<w^Tx_3$
- $w^Tx_4=0$
- $0<w^Tx_2<w^Tx_1<w^Tx_3$
- $w^Tx_5<0$
- $w^Tx_3<0$
Jul 2022 (day not given)
Question Q2 MCQ · 2 marks
Figure (described in the bank): axes $x_1,x_2$; one class lies inside a circular region not centred at the origin; the other class surrounds it.
A logistic regression classifier with weight vector $w$ has been learnt on this data which perfectly separates these two classes. Which of the following could be the feature vector $x$ that was used? Hint: the equation of a circle centred at $(a,b)$ with radius $r$ is $(x_1-a)^2+(x_2-b)^2=r^2$.
- $[1,x_1,x_2]^T$
- $[1,x_1,x_2,x_1^2,x_2^2]^T$
- $[1,x_1^2,x_2^2]^T$
- $[x_1,x_2,x_1^2,x_2^2]^T$
Question Q3 MCQ · 2 marks
A logistic regression model is being trained on a dataset of size $2n$. The first $n$ data-points belong to class-1 and the rest to class-0 (true labels). $P(y=1\mid x_i)=p_i$. Which of the following expressions is the loss of the model? We use the binary cross entropy loss. Labels are $1$ and $0$.
- $\sum_{i=1}^n-\log p_i+\sum_{i=n+1}^{2n}-\log(1-p_i)$
- $\sum_{i=1}^{2n}-\log p_i$
- $\sum_{i=1}^{2n}-\log(1-p_i)$
- $\sum_{i=1}^{2n}-p_i\log p_i$
Question Q4 MCQ · 2 marks
Which of the following is the weight update rule for logistic regression using gradient descent? $w$ is an $m$-dimensional weight vector, $X$ is a feature matrix of shape $n\times m$, $y$ is an $n$-dimensional label vector, $\alpha$ is the learning rate, $\sigma$ is the sigmoid function.
- $w:=w-\alpha X^T[\sigma(Xw)-y]$
- $w:=w+\alpha X^T[\sigma(Xw)-y]$
- $w:=w-\alpha X^T[Xw-y]$
- $w:=w+\alpha X^T[Xw-y]$
- $w:=w-\alpha X[\sigma(Xw)-y]$
- $w:=w+\alpha X[Xw-y]$
Question Q12 MCQ · 3 marks
Figure (described in the bank): axes $x_1,x_2$; the decision boundary is a line through the origin with slope $-1$; $w$ points perpendicular to it into the first quadrant (direction $(1,1)$). $p_1$ is far in the third quadrant (negative side, furthest from the boundary); $p_2$ is in the second quadrant just on the negative side; $p_3$ is in the first quadrant on the positive side; $p_4$ is further up-right than $p_3$.
A logistic regression model has been trained for a binary classification problem with labels $0$ and $1$. The probability returned for the $i$-th test point is $P(y=1\mid x_i)=p_i$. No dummy features were used, so both the weight vector and the feature vector have two components. Which of the following relationships is correct?
- $p_1<p_2<p_3<p_4$
- $p_1>p_2>p_3>p_4$
- $p_3<p_4<p_2<p_1$
- $p_1>p_2$ and $p_4>p_3$
Question Q13 MCQ · 3 marks
A logistic regression model is trained on videos to detect objectionable content. Objectionable videos belong to the positive class (label $1$), harmless videos to the negative class (label $0$). A good detector should identify almost all objectionable videos; missing even one has serious consequences. The detector may classify some harmless videos as positive, which is a price we are willing to pay. How should we choose the threshold (for inference) of this logistic regression model?
- The threshold should be a low value.
- The threshold should be a high value.
- The performance of the classifier is independent of the threshold.
Question Q9 MSQ · 2 marks
Figure (described in the bank): two panels. In the panel for $L_1$ the $14$ test points ($7$ per class, all correctly classified) lie far from the linear decision boundary. In the panel for $L_2$ they are clustered much closer to the boundary.
A logistic regression model is tested on two separate datasets, each having $14$ data-points, $7$ from each class. The binary cross-entropy loss on the two test-datasets is $L_1$ and $L_2$. The classification accuracy of the model on both is $100\%$. Which of the following statements are true? Assume the loss is computed mathematically to arbitrary precision ($10^{-20}$ is not rounded off to $0$).
- The loss of both the models is equal to $0$. That is, $L_1=L_2=0$.
- $L_1>L_2$
- $L_1<L_2$
- $L_1=L_2$
Question Q10 MSQ · 2 marks
Which of the following could be the vector of probabilities output by a softmax regression model for $5$ classes? Note that the options are independent of each other.
- $[0.2,0.2,0.2,0.2,0.2]$
- $[0.8,0.05,0.05,0.05,0.05]$
- $[0.4,0.5,0.3,0.2,0.1]$
- $[1,1,1,1,1]$
Question Q24 MCQ · 2 marks
Passage: Consider a softmax regression model for a multi-class classification problem that has $10$ classes and $20$ features. Classes are numbered $1,2,\dots,10$. There are no dummy features as that is taken care of by the bias term.
What is the dimension of the weight matrix $W$?
- $20\times10$
- $10\times10$
- $20\times20$
- $20\times1$
- $10\times1$
Question Q25 MCQ · 3 marks
Passage: Same softmax model as the previous question: $10$ classes, $20$ features, $W$ of shape $20\times10$.
What does the $3^{rd}$ column of the matrix $W$ represent?
- It is the vector of weights corresponding to the $3^{rd}$ class.
- The features corresponding to the $3^{rd}$ training example.
- The matrix $W$ is of size $20\times1$ and doesn't have a $3^{rd}$ column.
- The matrix $W$ is of size $10\times1$ and doesn't have a $3^{rd}$ column.
- It is the vector of weights corresponding to the $3^{rd}$ feature.
Question Q7 MCQ · 2 marks
Figure (described in the bank): scatter plot: a cluster of $-$ points at the bottom-left and $+$ points at the top-right. The same dataset appears in all four options.
Which of the following could be the decision boundary learned by a hard-margin SVM? Choose the most appropriate option. The dataset is the same for all four options.
- A negatively sloped line passing very close to the $-$ points (almost touching the top-rightmost $-$ points) and far from the $+$ points.
- A negatively sloped line passing very close to the $+$ points (almost touching the bottom-leftmost $+$ points) and far from the $-$ points.
- A negatively sloped line placed centrally, equidistant from the closest $+$ points and the closest $-$ points (maximum margin).
- A vertical line separating $-$ on the left from $+$ on the right, passing close to the rightmost $-$ point and the leftmost $+$ point.
Question Q8 MCQ · 2 marks
Given a training dataset $D=\{(x_i,y_i)\}_{i=1}^n$, which of the following are the constraints of the optimization problem for a hard-margin SVM, for $1\le i\le n$? $w$ is the weight vector, $b$ is the bias, $x_i$ is the $i$-th feature vector and $y_i\in\{-1,1\}$.
- $y_i(w^Tx_i+b)=1$
- $w^Tx_i+b=1$
- $w^Tx_i+b\ge1$
- $y_i(w^Tx_i+b)\ge1$
Question Q14 MSQ · 3 marks
Figure (described in the bank): four test points: $+$ at $(1,1)$, $-$ at $(3,1)$, $-$ at $(1,3)$ and $+$ at $(3,3)$ (an XOR pattern).
Consider a binary classification task that has $2$ features. Assume that we train a soft-margin, linear SVM (the decision boundary is a line in 2D space). We know nothing about the training set. The model is tested on the four-point dataset. What are the possible values of the accuracy of the model? All options are independent of each other. Assume that the decision boundary does not pass through any of the four points.
- $0$
- $0.25$
- $0.5$
- $0.75$
- $1$
Question Q15 SA · 3 marks
An SVM model trained for a binary classification task has weight vector $w=[5,7]^T$ and bias $b=-35$. It is tested on a dataset with $10$ samples ($x_1,x_2,y$): $(8,1,1),(10,5,1),(4,4,1),(1,1,1),(-1,2,1),(4,1,-1),(3,6,-1),(2,2,-1),(1,2,-1),(-1,1,-1)$. Compute the accuracy of the model on this dataset. Enter your answer between $0$ and $1$.
Type your answer on the interactive page.
Question Q17 SA · 1 marks
Figure (described in the bank): three parallel lines $w^Tx+b=-1$ (dotted, left), $w^Tx+b=0$ (decision boundary, solid, middle) and $w^Tx+b=1$ (dotted, right). The right side belongs to the red ($+1$) points. Three red points: $\xi_1$ on $w^Tx+b=1$; $\xi_2$ on $w^Tx+b=0$; $\xi_3$ on $w^Tx+b=-1$.
What is the value of $\xi_1$? Your answer should be a non-negative integer.
Type your answer on the interactive page.
Question Q18 SA · 1 marks
Figure (described in the bank): three parallel lines $w^Tx+b=-1$ (dotted, left), $w^Tx+b=0$ (decision boundary, solid, middle) and $w^Tx+b=1$ (dotted, right). The right side belongs to the red ($+1$) points. Three red points: $\xi_1$ on $w^Tx+b=1$; $\xi_2$ on $w^Tx+b=0$; $\xi_3$ on $w^Tx+b=-1$.
What is the value of $\xi_2$? Your answer should be a non-negative integer.
Type your answer on the interactive page.
Question Q19 SA · 1 marks
Figure (described in the bank): three parallel lines $w^Tx+b=-1$ (dotted, left), $w^Tx+b=0$ (decision boundary, solid, middle) and $w^Tx+b=1$ (dotted, right). The right side belongs to the red ($+1$) points. Three red points: $\xi_1$ on $w^Tx+b=1$; $\xi_2$ on $w^Tx+b=0$; $\xi_3$ on $w^Tx+b=-1$.
What is the value of $\xi_3$? Your answer should be a non-negative integer.
Type your answer on the interactive page.
Check your answers →
Other MLT topics