23 questions · 69 marks · 9 papers. Try each one before checking.
Solve them and check answers →Read the notes first
Aug 2023 (day not given)
Question Q2 MCQ · 4 marks
Consider a training dataset of $n$ points for a regression problem. Assume that the model is linear. Let $w_1$ and $w_2$ be the optimal weight vectors obtained from solving $w_1=\arg\min_w\sum_{i=1}^n(w^Tx_i-y_i)^2$ and $w_2=\arg\min_w\sum_{i=1}^n(w^Tx_i-y_i)^3$. Choose the most appropriate answer.
- $w_1$ will generalize better than $w_2$ on the test dataset.
- $w_2$ will generalize better than $w_1$ on the test dataset.
- Both models will show identical performance on the test dataset.
Question Q4 MSQ · 4 marks
Consider a linear regression model trained on dataset $X$ of shape $(d,n)$. Which of the following techniques could potentially decrease the loss on the training data (assuming the loss is the squared error)?
- Adding a dummy feature in the dataset and learning the intercept $w_0$ as well.
- Penalizing the model weights with $L_2$ regularization.
- Penalizing the model weights with $L_1$ regularization.
- Training the kernel regression model of degree $2$.
Aug 2025 (03 Aug)
Question Q6 MCQ · 2 marks
Consider a dataset $D=\{(x_1,y_1),\dots,(x_n,y_n)\}$. Let $w^*\in\mathbb R^d$ be the solution of $\min_w\|X^Tw-y\|_2^2$, where $X\in\mathbb R^{d\times n}$, $y\in\mathbb R^n$. Construct a new dataset $D_{new}$ by duplicating all points in $D$ and adding $10$ new points that lie exactly on the line $y=x^Tw^*$. Then the solution $w^*_{new}$ of the corresponding optimisation problem is also $w^*$.
- TRUE
- FALSE
Question Q8 MSQ · 2 marks
Let $w^*\in\mathbb R^d$ be the solution of $\min_w\|X^Tw-y\|_2^2$, where $X\in\mathbb R^{d\times n}$, $y\in\mathbb R^n$. Which of the following statements is/are true?
- $X^Tw^*$ is the projection of the labels onto the subspace spanned by the features.
- $X^Tw^*$ is the projection of the labels onto the subspace spanned by the data points.
- $w^*$ lies in the span of data points.
- $w^*$ lies in the span of features.
Question Q2 MCQ · 4 marks
Consider $n$ data points, each feature $x_i\in\mathbb R^+$ and label $y_i\in\mathbb R$. Suppose $y_i\mid x_i\sim N(\log(wx_i),1)$. Find the ML estimate $\hat w_{MLE}$ of $w$, where $w>0$.
- $\hat w=\exp\!\big(\tfrac1n\sum_{i=1}^n(y_i-\log x_i)\big)$
- $\hat w=\exp\!\big(\tfrac1n\sum_{i=1}^n(x_iy_i-x_i\log x_i)\big)$
- $\hat w=\tfrac1n\sum_{i=1}^n(y_i-\log x_i)$
- $\hat w=\exp\!\big(\tfrac1n\sum_{i=1}^n(x_iy_i-\log x_i)\big)$
Question Q7 MCQ · 1 marks
Consider the linear regression model $y=w^Tx+\epsilon$. Assuming $\epsilon\sim N(0,\sigma^2)$, maximising the conditional log-likelihood of $w$ is equivalent to minimising the sum of squared errors $\|y-X^Tw\|_2^2$.
- TRUE
- FALSE
Apr 2026 (06 Apr)
Question Q1 MCQ · 3 marks
Consider a linear regression model applied to a dataset in which each data-point is described by two features. The first feature is always $1$. The $i$-th data-point's feature-label pair is $((1,x_i),y_i)$. Let $(w_0^*,w_1^*)\in\mathbb R^2$ be the optimal weight vector that minimises the sum of squared errors. Consider two scenarios: $S_1$: $w_0^*+w_1^*x_i>y_i$ for each data-point. $S_2$: $w_0^*+w_1^*x_i<y_i$ for each data-point. Which of the following is true?
- $S_1$ is possible, but $S_2$ is impossible.
- $S_1$ is impossible, but $S_2$ is possible.
- One of $S_1$ or $S_2$ is possible.
- Both $S_1$ and $S_2$ are impossible.
Aug 2026 (14 Aug)
Question Q4 MCQ · 4 marks
On a machine that folds plastic film, the operating temperature can be varied between $130^\circ$C and $185^\circ$C. To study the relationship between temperature and fold thickness, $n=12$ observations were collected. Scatter plot description: horizontal axis Temperature ($130$ to $185$), vertical axis Thickness (ticks $90$ to $130$). Twelve points closely follow a downward-sloping line from about $(130,135)$ to $(185,86)$.Determine, by inspecting the figure, which set of parameter estimates for $\text{Thickness}=\beta_0+\beta_1(\text{Temperature})+\epsilon$, $\epsilon\sim N(0,\sigma^2)$, is most appropriate. ($\hat\beta_0$ intercept, $\hat\beta_1$ slope, $\hat\sigma$ estimated standard deviation of the error.)
- $\hat\beta_0=0,\ \hat\beta_1=-0.9,\ \hat\sigma=360$
- $\hat\beta_0=0,\ \hat\beta_1=0.9,\ \hat\sigma=3.6$
- $\hat\beta_0=252,\ \hat\beta_1=-0.9,\ \hat\sigma=3.6$
- $\hat\beta_0=-252,\ \hat\beta_1=-0.9,\ \hat\sigma=360$
- $\hat\beta_0=252,\ \hat\beta_1=-0.9,\ \hat\sigma=360$
Question Q8 MCQ · 3 marks
A dataset has $n=3$ data points and $d=2$ features. The two feature vectors are $f_1=[1,0,1]^T$, $f_2=[0,1,1]^T$. For which label vector $y$ is the linear model $f(x)=w^Tx$ guaranteed to achieve exactly zero training error?
- $y=[1,2,3]^T$
- $y=[1,2,4]^T$
- $y=[2,1,4]^T$
- $y=[0,0,1]^T$
Question Q9 MCQ · 3 marks
Suppose the label vector $y\ne0$ is orthogonal to every feature vector, i.e. $f_j^Ty=0$ for all $j=1,\dots,d$. $w^*$ is the optimal weight after minimising the linear regression objective. Which statement is correct?
- $X^Tw^*=y$ and the training error is $0$.
- $X^Tw^*=0$ and the squared training error equals $\|y\|_2^2$.
- $X^Tw^*=0$ and the squared training error equals $0$.
- The normal equations have no solution.
Question Q7 MCQ · 3 marks
A student $P$ minimises the sum of squared errors loss while another student $Q$ minimises the mean squared error loss $L(w)=\tfrac12\sum_{i=1}^n(w^Tx_i-y_i)^2$, $L'(w)=\tfrac1{2n}\sum_{i=1}^n(w^Tx_i-y_i)^2$. Both use gradient descent with the same learning rate $\eta$ and the same initial parameter vector $w_0$. Which statement is correct?
- They converge to different minimizers, because the losses differ.
- They converge to the same minimizer, but $Q$'s steps are $n$ times smaller; $Q$ would need learning rate $n\eta$ to reproduce $P$'s trajectory.
- They converge to the same minimizer, and their iterates coincide at every step.
- They converge to the same minimizer, but $Q$'s steps are $n$ times larger.
Question Q3 MCQ · 4 marks
Under the probabilistic view of linear regression, assume $y_i\sim N(w^Tx_i,\sigma^2)$ with independent observations. Suppose the true noise variance is $4\sigma^2$ instead of $\sigma^2$, while the dataset and the observed labels remain unchanged. What happens to the ML estimator $\hat w_{ML}=(XX^T)^{-1}Xy$?
- It is unchanged.
- It is scaled by $4$.
- It is scaled by $1/4$.
- It cannot be determined without knowing $\sigma^2$.
Dec 2024 (01 Dec)
Question Q21 MSQ · 3 marks
Consider a linear regression model with loss $L(w)=\sum_{i=1}^n(w^Tx_i-y_i)^2$, where $x_i$ are the $d$-dimensional training data points and $y_i$ their labels. For the optimal weight vector $w^*$, which among the following is correct?
- If we double all the values of $y_i$, $w^*$ will also get doubled.
- If we double all the values of $y_i$, $w^*$ will get halved.
- If we double all the values of $x_i$, $w^*$ will get halved.
- If we double all the values of $x_i$, $w^*$ will also get doubled.
Aug 2024 (04 Aug)
Question Q3 SA · 3 marks
Consider the following training dataset for a linear regression problem with one feature: $(x_i,y_i)=(1.2,1),(-1,0.1),(2.1,2),(-2,-1)$. Find the value of $w^*$, the optimal weight.
Type your answer on the interactive page.
Question Q7 SA · 2 marks
A linear regression problem has two features and $10{,}000$ training points. The blue point $w^{(t)}$ is the weight at some iteration of gradient descent. $w_1=\tfrac1{\sqrt{10}}(3,1)$, $w_2=\tfrac1{\sqrt{10}}(-3,-1)$, $w_3=\tfrac1{\sqrt{10}}(-1,3)$ are unit vectors; $w_1$ points in the direction of the gradient (figure described in words).If the next iteration of gradient descent is expressed as $w^{(t+1)}=w^{(t)}+\eta w_k$ with $\eta>0$, what would be the value of $k$?
Type your answer on the interactive page.
Question Q8 SA · 2 marks
Same setting: $w_1=\tfrac1{\sqrt{10}}(3,1)$ is the unit vector along the gradient, $w_2=-w_1$, $w_3\perp w_1$.If $w^{(t)}=\begin{bmatrix}0.4\\0.1\end{bmatrix}$ and $\eta=\tfrac1{\sqrt{10}}$, find $\|w^{(t+1)}\|$ where we use the usual $L_2$ norm.
Type your answer on the interactive page.
Mar 2024 (24 Mar)
Question Q6 MCQ · 3 marks
Predicting house sale prices from square footage with two models: Model $P$: $\hat y=w_0+w_1x$; Model $Q$: $\hat y=w_0+w_1x+w_2x^2$. The training set has $200$ houses; the test set has $50$ houses. Evaluation metric: mean squared error (MSE).Considering the specific context of predicting house prices based on square footage, which model is more likely to provide accurate predictions on the training dataset?
- Model $P$
- Model $Q$
- Both models are equally likely to provide accurate predictions
- It depends on the distribution of house prices in the dataset
Question Q7 MSQ · 3 marks
Predicting house sale prices from square footage with two models: Model $P$: $\hat y=w_0+w_1x$; Model $Q$: $\hat y=w_0+w_1x+w_2x^2$. Training set: $200$ houses; test set: $50$ houses; metric: MSE.Identify the factors that could influence the model's performance on the training dataset in this housing price prediction scenario. Select all correct statements:
- Model $P$ may struggle to capture non-linear relationships present in house price data.
- Model $Q$ might be sensitive to outliers in the square footage variable.
- The choice between Model $P$ and Model $Q$ depends on the budget constraints of potential homebuyers.
- Model $Q$ will always perform well on the test dataset.
Question Q16 MCQ · 3 marks
Let $X$ be the data matrix of shape $(d,n)$ and $y$ the corresponding label vector. A linear regression model $\hat y_i=w^Tx_i$ is fit using the squared error on the same dataset. If the solution $w^*$ is orthogonal to the subspace spanned by the data points (the columns of $X$), what will be the squared error?
- $0$
- $1$
- $\|y\|^2$
- Insufficient information to answer
Dec 2023 (day not given)
Question Q3 SA · 4 marks
Consider a training set $\{X,y\}$, where $X\in\mathbb R^{d\times n}$ and $y\in\mathbb R^n$. A team uses the linear regression model $h=w^TX$ that minimises $L(w)=\sum_{i=1}^n(w^Tx_i-y_i)^2$.Let the dimensions be $d=3$ and $n=100$. What is the sum of the elements of $X(X^Tw-y)$? If you think the given information is insufficient, enter $-1$.
Type your answer on the interactive page.
Question Q5 SA · 4 marks
Consider a training set $\{X,y\}$ with $X\in\mathbb R^{d\times n}$ and $y\in\mathbb R^n$. A team uses the linear regression model that minimises $L(w)=\sum(w^Tx_i-y_i)^2$.The team modifies the relation as $y=X^Tw+\epsilon$ where $\epsilon\sim N(0,\sigma^2)$. Suppose $\sigma^2=1$, $d=3$, $n=100$. Assume $\sum_{i=1}^n(w^Tx_i-y_i)^2=0$ for $w=w^*$. What is the negative log-likelihood of the dataset $(X,y)$ at $w^*$? Use logarithm to base $10$.
Type your answer on the interactive page.
Mar 2025 (16 Mar)
Question Q12 SA · 3 marks
Consider a linear regression model $y_i=w^Tx_i$ with an initial weight $w=[3]$.Using the squared loss function and a learning rate of $\eta=0.2$, compute the updated weight after one iteration of gradient descent for the dataset $(x_1,y)=(1,4),(2,7),(3,10),(4,13)$. Use $\nabla f(w)=2(XX^T)w-2Xy$.
Type your answer on the interactive page.
Question Q13 SA · 2 marks
Same model as the previous question; the algorithm stops at the weight computed in the previous question ($w=7$).What will be the predicted value for the data point $x_1=5$?
Type your answer on the interactive page.
Check your answers →
Weeks covering this topic
Other MLT topics