Ridge, Lasso and MAP: past questions

21 questions · 62.5 marks · 9 papers. Try each one before checking.

Solve them and check answers →Read the notes first

Aug 2023 (day not given)

Question Q6 MSQ · 4.5 marks

Which of the following statements is/are true regarding solution of Ridge regression problem?
  1. If there are multiple $w$ solutions for minimizing mean square error, then $w_R$ will be the one with least norm.
  2. If there are multiple $w$ solutions for minimizing mean square error, then $w_R$ will be the one with highest norm.
  3. Prior for $w$ is $N(0,\gamma^2I)$ and $y_i\mid x_i\sim N(w^Tx_i,\sigma^2)$
  4. Prior for $w$ is $N(1,\gamma^2I)$ and $y_i\mid x_i\sim N(0,\sigma^2)$

Question Q8 SA · 4 marks

Consider a ridge regression model with the loss $L(w)=\|X^Tw-y\|^2+\lambda\|w\|^2$ trained on a given dataset with $\lambda=0.1,0,1,10,100$. Which of the following value of $\lambda$ is more likely to underfit the model?

Type your answer on the interactive page.

Question Q9 SA · 4 marks

Consider the data set $X=[8,6,10]$. Assuming a ridge penalty $\lambda=100$, what will be the value of $\hat w_{ridge}/\hat w_{MLE}$? Here $\hat w_{ridge}$ and $\hat w_{MLE}$ are the Ridge and MLE estimates of the weight vectors. Assume the label vector $y$ of shape $(3,1)$ is known. Enter your answer correct to two decimal places.

Type your answer on the interactive page.

Aug 2025 (03 Aug)

Question Q3 MCQ · 3 marks

In the Bayesian modelling for linear regression, we assume $y\mid x\sim\text{Normal}(w^Tx,\sigma^2I)$ and $w\sim\text{Normal}(0,\gamma^2I)$. Under this setup, the MAP estimator is $\hat w_{MAP}=\arg\min_w\{\|y-X^Tw\|^2+\lambda\|w\|^2\}$. Find the expression for the regularisation parameter $\lambda$.
  1. $\lambda=\sigma^2\cdot\gamma^2$
  2. $\lambda=\dfrac{\gamma^2}{\sigma^2}$
  3. $\lambda=\dfrac{\sigma^2}{\gamma^2}$
  4. $\lambda=\dfrac{1}{\sigma^2+\gamma^2}$

Question Q5 MCQ · 3 marks

Consider the linear regression model $y=w^Tx+\epsilon$ where $\epsilon\sim N(0,\sigma^2)$. $\hat w_{MLE}$ is the maximum likelihood estimator, $\hat w_{MAP}$ the maximum a posteriori estimator, $\mathbb E\|\hat w-w\|^2$ the mean squared error of an estimator. Which of the following statements is/are true?
  1. The estimator $\hat w_{MLE}$ always has a lower mean squared error (MSE) than $\hat w_{MAP}$ because it is unbiased.
  2. The estimator $\hat w_{MAP}$ always provides better estimates than $\hat w_{MLE}$ because it uses prior information.
  3. The estimator $\hat w_{MAP}$ can achieve lower MSE than $\hat w_{MLE}$ for some $\lambda>0$.
  4. The MSE of $\hat w_{MLE}$ and $\hat w_{MAP}$ is always equal when the sample size is small.

Apr 2026 (06 Apr)

Question Q7 MSQ · 3 marks

A researcher models a dataset with $y=X\theta+\epsilon$ and considers two i.i.d. noise assumptions: A: Gaussian $N(0,\sigma^2)$; B: Laplace$(0,b)$. The data contain several extreme outliers from sensor malfunctions. Which statement correctly describes the behaviour of the MLE of $\theta$?
  1. Under Assumption A, the MLE is equivalent to minimising Mean Squared Error (MSE), which is highly sensitive to outliers because the penalty grows quadratically.
  2. Under Assumption B, the MLE is equivalent to $L_1$ regularization, which is more robust to outliers because the penalty for large residuals grows linearly.
  3. Both Assumption A and Assumption B lead to the same optimal parameter vector $\hat\theta$ regardless of the presence of outliers.
  4. All the given options are correct

Aug 2026 (14 Aug)

Question Q5 MCQ · 4 marks

Let the training data be $(x_i,y_i)_{i=1}^n$. Consider the ridge estimator $\hat w_R=\arg\min_w\big[\tfrac12\sum_{i=1}^n(w^Tx_i-y_i)^2+\tfrac\lambda2\|w\|^2\big]$ for fixed $\lambda>0$. For MAP: prior $w\sim N(0,\sigma^2I)$; likelihood $y_i\mid x_i,w\sim N(w^Tx_i,1)$. For which value of $\lambda$ do the two problems become identical?
  1. $\lambda=\sigma^2$
  2. $\lambda=\dfrac1{2\sigma^2}$
  3. $\lambda=1$
  4. $\lambda=\dfrac1{\sigma^2}$

Dec 2024 (01 Dec)

Question Q16 MCQ · 2 marks

Consider the linear regression model $y_i\mid x_i=w^Tx_i+\epsilon_i$, where the noise $\epsilon\sim\text{Normal}(0,1)$.
For some $\lambda>0$, where $\lambda\in\mathbb R$, the MSE of $\hat w_{ML}$ is greater than the MSE of $\hat w_{Ridge}$.
  1. TRUE
  2. FALSE

Question Q17 MCQ · 4 marks

Consider the linear regression model $y_i\mid x_i=w^Tx_i+\epsilon_i$ with $\epsilon\sim\text{Normal}(0,1)$.
Consider the Bayesian formulation where the prior for $w$ is $w\sim\text{Laplace}(0,2/\lambda)$. Which among the following is true? Hint: If $X\sim\text{Laplace}(\mu,b)$ then $f_X(x)=\frac1{2b}e^{-|x-\mu|/b}$.
  1. $\hat w_{MAP}=\arg\min_w\sum_{i=1}^n(w^Tx_i-y_i)^2+\lambda\|w\|_2^2$
  2. $\hat w_{MAP}=\arg\max_w\sum_{i=1}^n(w^Tx_i-y_i)^2+\lambda\|w\|_2^2$
  3. $\hat w_{MAP}=\arg\min_w\sum_{i=1}^n(w^Tx_i-y_i)^2+\lambda\|w\|_1$
  4. $\hat w_{MAP}=\arg\max_w\sum_{i=1}^n(w^Tx_i-y_i)^2+\lambda\|w\|_1$

Aug 2024 (04 Aug)

Question Q13 MCQ · 1 marks

Parameter-space figure (described in words): axes $w_1$ ($-1$ to $8$) and $w_2$ ($-2$ to $4$). A blue diamond centred at the origin with vertices $(\pm1,0),(0,\pm1)$ is the $L_1$ ball. To its right are two concentric oval contours of the squared error $f(w)$: an inner green oval $f=c_2$ and an outer orange oval $f=c_1$. The outer oval $f=c_1$ touches the diamond at the corner $(1,0)$. $\lambda$ is the regularisation parameter.
What kind of a regression problem is this?
  1. Ridge regression
  2. LASSO regression

Question Q16 MCQ · 1 marks

Parameter-space figure (described in words): axes $w_1$ ($-1$ to $8$) and $w_2$ ($-2$ to $4$). A blue diamond centred at the origin with vertices $(\pm1,0),(0,\pm1)$ is the $L_1$ ball. To its right are two concentric oval contours of the squared error $f(w)$: an inner green oval $f=c_2$ and an outer orange oval $f=c_1$. The outer oval $f=c_1$ touches the diamond at the corner $(1,0)$. $\lambda$ is the regularisation parameter.
Which of the following statements is true?
  1. Feature-1 can be discarded.
  2. Feature-2 can be discarded.
  3. Any one of the two features can be discarded.
  4. Both features are equally important and neither of them can be discarded.

Question Q17 MSQ · 2 marks

Parameter-space figure (described in words): axes $w_1$ ($-1$ to $8$) and $w_2$ ($-2$ to $4$). A blue diamond centred at the origin with vertices $(\pm1,0),(0,\pm1)$ is the $L_1$ ball. To its right are two concentric oval contours of the squared error $f(w)$: an inner green oval $f=c_2$ and an outer orange oval $f=c_1$. The outer oval $f=c_1$ touches the diamond at the corner $(1,0)$. $\lambda$ is the regularisation parameter.
Which of the following statements are true? Exactly two options are correct.
  1. $c_1>c_2$
  2. $c_1<c_2$
  3. Total loss at optimal point is $c_1+\lambda$
  4. Total loss at optimal point is $c_2+\lambda$

Question Q14 SA · 0.5 marks

Parameter-space figure (described in words): axes $w_1$ ($-1$ to $8$) and $w_2$ ($-2$ to $4$). A blue diamond centred at the origin with vertices $(\pm1,0),(0,\pm1)$ is the $L_1$ ball. To its right are two concentric oval contours of the squared error $f(w)$: an inner green oval $f=c_2$ and an outer orange oval $f=c_1$. The outer oval $f=c_1$ touches the diamond at the corner $(1,0)$. $\lambda$ is the regularisation parameter.
What is the optimal value of $w_1$?

Type your answer on the interactive page.

Question Q15 SA · 0.5 marks

Parameter-space figure (described in words): axes $w_1$ ($-1$ to $8$) and $w_2$ ($-2$ to $4$). A blue diamond centred at the origin with vertices $(\pm1,0),(0,\pm1)$ is the $L_1$ ball. To its right are two concentric oval contours of the squared error $f(w)$: an inner green oval $f=c_2$ and an outer orange oval $f=c_1$. The outer oval $f=c_1$ touches the diamond at the corner $(1,0)$. $\lambda$ is the regularisation parameter.
What is the optimal value of $w_2$?

Type your answer on the interactive page.

Mar 2024 (24 Mar)

Question Q17 MCQ · 4 marks

Given a design matrix $X\in\mathbb R^{d\times n}$ and a target vector $Y\in\mathbb R^{n\times1}$ with $X=\begin{bmatrix}1&2\\3&4\end{bmatrix}$, $Y=\begin{bmatrix}3\\5\end{bmatrix}$. Calculate the coefficients $\beta$ for Ridge regression with $\lambda=1$.
  1. $\beta=[0.5,\ 0.5]$
  2. $\beta=[1,\ 0.5]$
  3. $\beta=[0.54,\ 0.88]$
  4. $\beta=[0.67,\ 0.33]$
  5. None of these

Dec 2023 (day not given)

Question Q6 MCQ · 4 marks

In a Ridge regression scenario with the dataset $X=[-2\ \ 3\ \ 4]$ and the corresponding target vector $Y=[-15,\ 18,\ 24]^T$. The regularization parameter is $\lambda=3$. Calculate the ratio of the Maximum Likelihood Estimate (MLE) weight vector $w_{MLE}$ to the Ridge weight vector $w_{Ridge}$ and select the correct range.
  1. $(1.05,\ 1.20)$
  2. $(0.85,\ 0.95)$
  3. $(1,\ 1)$
  4. $(3,\ 3.5)$

Question Q10 MCQ · 4 marks

Given a design matrix $X\in\mathbb R^{d\times n}$ and a target vector $Y\in\mathbb R^{n\times1}$ with $X=\begin{bmatrix}2&3\\4&1\end{bmatrix}$, $Y=\begin{bmatrix}2\\4\end{bmatrix}$. Calculate the coefficients $\beta$ for Ridge regression with $\lambda=2$.
  1. $\beta=[0.75,\ 0.75]$
  2. $\beta=[1,\ 0.5]$
  3. $\beta=[0.5,\ 1]$
  4. $\beta=[0.85,\ 0.12]$
  5. None of these

Question Q9 MCQ · 4 marks

Three weight vectors $w_1,w_2,w_3$ are learned for an eight-dimensional dataset using different regression models (not in any particular order). $w_1=[0.32,-0.12,0,0.42,-0.18,-0.05,0.2,-0.09]$, $w_2=[0.25,-0.08,0.38,-0.22,0.14,-0.31,0.19,-0.12]$, $w_3=[0.22,-0.11,0.04,0.16,0.08,-0.03,0.1,-0.14]$. Select the most appropriate match for these weight vectors.
  1. $w_1\to$ Lasso, $w_2\to$ Linear regression, $w_3\to$ Ridge
  2. $w_1\to$ Ridge, $w_2\to$ Lasso, $w_3\to$ Linear regression
  3. $w_1\to$ Linear regression, $w_2\to$ Ridge, $w_3\to$ Lasso
  4. $w_1\to$ Ridge, $w_2\to$ Linear regression, $w_3\to$ Lasso

Question Q7 MSQ · 4 marks

Which of the following is/are the primary advantages of using $L_1$ regularization?
  1. $L_1$ regularization reduces the risk of overfitting.
  2. $L_1$ regularization tends to produce sparse models.
  3. $L_1$ regularization always improves the model's predictive accuracy on large datasets.
  4. $L_1$ regularization is primarily used to increase model complexity.

Mar 2025 (16 Mar)

Question Q2 MCQ · 3 marks

Below is the constrained version of the ridge regression optimisation problem $\min_w\sum_{i=1}^n(w^Tx_i-y_i)^2$ subject to $\|w\|^2\le\theta$. Weight vectors and their mean squared error (MSE): $w_1=[1,1,1,1]^T$, MSE $=2$; $w_2=[0,2,1,3]^T$, MSE $=7$; $w_3=[1,2,0,1]^T$, MSE $=1$; $w_4=[2,1,1,2]^T$, MSE $=8$. If $\theta=10$ which of the following weight vectors will be selected as the final weight vector by ridge regression?
  1. $w_1$
  2. $w_2$
  3. $w_3$
  4. $w_4$

Question Q8 MSQ · 3 marks

Let $\hat w_R$ and $\hat w$ be the ridge coefficient estimate and the least squares estimate, respectively, of the linear regression problem. Which of the following holds true?
  1. For $\lambda=0$, $\dfrac{\|\hat w_R\|^2}{\|\hat w\|^2}=1$
  2. For $\lambda=0$, $\dfrac{\|\hat w_R\|^2}{\|\hat w\|^2}=0$
  3. For $\lambda=\infty$, $\dfrac{\|\hat w_R\|^2}{\|\hat w\|^2}=0$
  4. For $\lambda=\infty$, $\dfrac{\|\hat w_R\|^2}{\|\hat w\|^2}=1$

Check your answers →

Weeks covering this topic

Other MLT topics