Cross-validation and model comparison: past questions

13 questions · 42 marks · 6 papers. Try each one before checking.

Solve them and check answers →Read the notes first

Aug 2025 (03 Aug)

Question Q4 MCQ · 3 marks

SettingLearning rateIterationsTraining errorValidation error
10.051000150160
20.10800145150
30.15500140190
40.25350170180
You are evaluating the performance of a linear regression model using different hyperparameter settings (learning rate and number of iterations). Below are the results. Which hyperparameter setting would you choose based on the training and validation errors? Why?
  1. Setting 3, because it has the lowest training error, indicating the best fit to the training data.
  2. Setting 2, because it has the lowest validation error and a relatively low training error, indicating a good generalization.
  3. Setting 1, because it has the highest number of iterations and therefore likely to be more stable.
  4. Setting 4, because it uses the highest learning rate and converges the fastest.

Apr 2026 (06 Apr)

Question Q2 MCQ · 3 marks

$\lambda$Avg. training error (MSE)Avg. validation error (MSE)
0.0011.258.4
0.12.14.2
13.453.15
105.83.2
10012.411.9
In Ridge Regression, the optimal weight vector is given by $\hat w=(XX^T+\lambda I)^{-1}Xy$. The regularization parameter $\lambda$ is determined using 5-fold cross-validation. The table summarizes the average training and validation errors (MSE) for various values of $\lambda$. Based on the cross-validation results provided, what is the most appropriate choice for $\lambda$?
  1. $0.001$
  2. $0.1$
  3. $1.0$
  4. $10.0$
  5. $100$

Question Q3 MCQ · 3 marks

Consider a training dataset $(x_i,y_i)_{i=1}^n$ where all input points $x_i\in\mathbb R^d$ are distinct. Which of the following models is guaranteed to achieve a training error of zero?
  1. $h(x_i)=\frac1n\sum_{j=1}^ny_j\quad\forall i$
  2. $h(x_i)=0\quad\forall i$
  3. $h(x_i)=w^Tx_i+b\quad\forall i$ given $n>d+1$
  4. $h(x_i)=y_i\quad\forall i$

Question Q4 MCQ · 3 marks

Models: 1. Decision Tree; 2. Gaussian Naive Bayes; 3. Ridge Regression; 4. 1-Nearest Neighbor; 5. Lasso Regression. Geometry: (A) Axis-Aligned; (B) Linear Hyperplane; (C) Non-Linear / Curved.
Consider the following classification models and their geometric properties. Select the correct many-to-one matching:
  1. $\{1\to A\};\{2,3,4\to B\};\{5\to C\}$
  2. $\{1\to A\};\{3,5\to B\};\{2,4\to C\}$
  3. $\{1,3\to A\};\{2,5\to B\};\{4\to C\}$
  4. $\{1\to A\};\{2,4\to B\};\{3,5\to C\}$

Dec 2024 (01 Dec)

Question Q8 SA · 4 marks

Consider the following dataset: $D=\{(1,2),(2,2),(0,1)\}$. Assume that Leave one out cross validation is applied on this dataset and the model used is $y=w_0+w_1x$. Suppose $w=[w_0,w_1]^T$ be the weight obtained when $(2,2)$ is used in the validation set. Then calculate $\|w\|_2^2$.

Type your answer on the interactive page.

Question Q11 MSQ · 4 marks

Select all true statements.
  1. In Decision tree, if a question $Q_1$ is "better" than question $Q_2$ then information gains for $Q_1$ is greater than information gains $Q_2$ always.
  2. The training dataset is not required while predicting the label of a test-point in the $k$-NN algorithm.
  3. A question of the form $f_k\le\theta$ always partitions the dataset into two non-empty sets.
  4. The depth of the tree is a hyperparameter and has to be chosen using cross validation.
  5. Decision trees are prone to underfit if the maximum depth is set too low.

Aug 2024 (04 Aug)

Question Q10 SA · 1.5 marks

A dataset for ridge regression has $1000$ data-points. $k$-fold cross validation is performed to estimate the value of $\lambda$ in ridge regression with $k=4$. For a given value of $\lambda$:
How many models have to be trained?

Type your answer on the interactive page.

Question Q11 SA · 1.5 marks

A dataset for ridge regression has $1000$ data-points. $4$-fold cross validation is performed to estimate $\lambda$.
While training each of these models, how many data-points does the training set have?

Type your answer on the interactive page.

Question Q2 MSQ · 3 marks

Which of the following classifiers are certainly capable of achieving zero training error for any binary classification problem with features in $\mathbb R^2$? Note: while computing the training error for KNN, each data-point is its own neighbor.
  1. Decision tree
  2. KNN with $k=1$
  3. KNN with $k=5$
  4. Naive Bayes

Mar 2024 (24 Mar)

Question Q13 MCQ · 4 marks

Dataset (sample number, $X$, $y$):
Sample No$X$$y$
138
203
3512
4613
Linear regression model $y=w_0+w_1x$, with Leave-One-Out Cross-Validation. The question refers to the same left-out point as the neighbouring part, where the $3^{\text{rd}}$ sample is the validation point.
What will be the predicted value for the left-out data point?
  1. $12$
  2. $13$
  3. $12.3$
  4. $11.3$
  5. None of these

Question Q12 SA · 4 marks

Dataset (sample number, $X$, $y$):
Sample No$X$$y$
138
203
3512
4613
Linear regression model $y=w_0+w_1x$, with Leave-One-Out Cross-Validation.
Enter the value of $w_1$ obtained when the $3^{\text{rd}}$ sample is used as the validation data point.

Type your answer on the interactive page.

Question Q20 MSQ · 4 marks

Select all true statements.
  1. In Decision tree, if a question $Q_1$ is "better" than question $Q_2$, then information gains for $Q_1$ is greater than information gains $Q_2$ always.
  2. The training dataset is required while predicting the label of a test-point in the $k$-NN algorithm.
  3. A question of the form $f_k\le\theta$ always partitions the dataset into two non-empty sets.
  4. The depth of the tree is a hyperparameter and has to be chosen using cross validation.
  5. Decision trees are prone to overfit if the maximum depth is set too low.

Dec 2023 (day not given)

Question Q8 MSQ · 4 marks

Select all the statements that are true about decision trees and $k$-Nearest Neighbors ($k$-NN) in machine learning:
  1. Decision trees are a supervised learning algorithm used for classifications.
  2. The $k$-NN algorithm is a lazy learner, which means it doesn't build an explicit model during the training phase.
  3. In $k$-NN, the value of $k$ represents the number of features used for classification.
  4. $k$-Nearest Neighbors ($k$-NN) is a parametric model that requires estimating probability distributions.
  5. The depth of the tree is a hyperparameter and is typically chosen using cross-validation.

Check your answers →

Weeks covering this topic

Other MLT topics