chapter

    Chapter 3 — Supervised Learning Practice Questions for Gate Da

    Solve 10+ Chapter 3 — Supervised Learning practice questions for GATE DA with answers and detailed solutions. Free sample questions below.

    Try a question

    Answer it here to see how it works. Nothing is recorded until you sign in.

    Question 1
    Level 4: Challenger

    Consider a hard-margin SVM trained on the dataset: with label , with label , and with label . A student claims that all points in a linearly separable dataset must be support vectors if they are not strictly inside the convex hull of their class. This is a contradiction because points can lie outside the margin without being support vectors. What is the minimum number of support vectors this SVM can have?

    Question 2
    Level 4: Challenger

    Consider a binary classification dataset with two points: and . We fit a logistic regression model where , with no bias term. Suppose the weight is chosen such that the predicted probability at is exactly .

    Find the value of the gradient of the negative log-likelihood with respect to , evaluated at this weight .

    Question 3
    Level 4: Challenger

    Consider the dataset with input matrix and target vector . We fit a Ridge regression model without an intercept term, using the regularization parameter . The optimal weight vector is given by .

    Which of the following are correct values of the weight vector for the specified values of ?

    Question 4
    Level 4: Challenger

    Consider the dataset with input matrix and target vector . We fit an ordinary least squares linear regression model without any regularization. Let be the hat matrix, be the vector of ordinary residuals, and be the Leave-One-Out Cross-Validation (LOOCV) residual for the -th observation.

    Which of the following are correct values for the quantities related to the LOOCV of this model?

    Question 5
    Level 4: Challenger

    Consider the binary classification dataset with input matrix and labels . We train a logistic regression model (without bias) using the empirical cross-entropy loss . We use gradient descent to minimize . What is the maximum value of the learning rate (rounded to 2 decimal places) such that the gradient descent is guaranteed to converge to the unique global minimum for any initialization ?

    Question 6
    Level 4: Challenger

    Consider the binary classification dataset in with three points: with label , with label , and with label . We run the Perceptron learning algorithm starting with the initial weight vector . In each step, the algorithm selects a misclassified point and updates . A point is considered misclassified if . What is the maximum possible number of mistakes the algorithm can make before converging, over all possible sequences of misclassified point selections?

    Question 7
    Level 4: Challenger

    Consider the four points in with labels: with label , with label , with label , and with label . A hard-margin support vector machine is trained on this dataset. How many of these four points are support vectors of the resulting classifier?

    Question 8
    Level 4: Challenger

    Consider the binary classification dataset in with four points:

    , , , .

    We run the perceptron learning algorithm with initial weights , cycling through the points in the order The update rule is: if , then .

    Find the total number of weight updates made by the algorithm before it converges (i.e., completes a full pass through all four points without any update).

    Question 9
    Level 4: Challenger

    Consider the regularized empirical risk minimization problem for a linear classifier with the hinge loss. The objective function for a single weight is given by:

    where , , and the dataset consists of two points: and .

    Let denote a subgradient of at . Evaluate the components of the subgradient at . Which of the following are correct values?

    Question 10
    Level 4: Challenger

    Consider the dataset . LASSO regression with regularization parameter (applied only to the slope coefficient; the intercept is unregularized) is fit to this data. Let be the predicted value at under this LASSO model. Find the value of for which ridge regression (same setup: regularization applied only to the slope, intercept unregularized) yields the same predicted value at .

    Free preview ends here

    Login to view the complete practice questions and solutions

    Creating an account is free. You get the rest of this chapter, step-by-step solutions, and a study plan built around the topics you are actually weak at.

    Explore complete test series, official past papers, and chapter-wise study tools.

    Why MastersUp

    Personalised first. High quality throughout.

    Most platforms hand everyone the same content. Here the content moves with your performance, topic by topic.

    Built around you, not around a syllabus PDF

    Every answer you give moves your topic-level intelligence rate. The next question, the next revision card and tomorrow's plan all change with it.

    Revision that hits your weak spots

    We only revise topics you have actually attempted and are still below the safe bar on — never the same chapter on repeat.

    Questions calibrated to the real exam

    Each question carries a measured toughness. You are served a rung above your current level, so practice keeps stretching you.

    Notes written for recall, not for volume

    Full lesson cards for first study, curated short-note cards for the last mile — with derivations, traps and exam patterns marked.

    One place for everything

    Notes, chapter practice, previous-year questions, test series and full-length papers — all feeding one picture of your preparation.

    Honest progress

    No vanity streaks. Progress here means chapters mastered and accuracy that held up on harder questions.

    Unlock the whole course

    Full notes and short notes, the complete question bank with worked solutions, mock tests, full-length papers, and an adaptive plan that rebuilds itself as you improve.

    Chapter 3 — Supervised Learning Practice Questions for GATE DA

    Solve 10+ Chapter 3 — Supervised Learning practice questions for GATE DA with answers and detailed solutions. Free sample questions below.

    Chapter 3 — Supervised Learning: Solved Questions with Step-by-Step Explanations (10 Problems)

    Question 1 · Machine Learning NAT

    Consider a hard-margin SVM trained on the dataset: with label , with label , and with label . A student claims that all points in a linearly separable dataset must be support vectors if they are not strictly inside the convex hull of their class. This is a contradiction because points can lie outside the margin without being support vectors. What is the minimum number of support vectors this SVM can have?

    Correct Answer:

    2.00

    Step-by-Step Solution

    Key idea: This is a hard-margin SVM question testing the KKT conditions. The key observation is that a point is a support vector if and only if its dual variable . We can find the optimal by maximizing the dual objective.

    Step 1: The dual objective for hard-margin SVM is to maximize subject to and .

    Step 2: Compute the dot products:

    , , .

    , , .

    , , .

    Step 3: The constraint gives .

    Step 4: Substitute into :

    Simplifying the quadratic form:

    .

    So .

    Step 5: Maximize by setting partial derivatives to zero:

    .

    .

    Step 6: Solve the system:

    Subtracting the second from the first: .

    Then .

    And .

    Step 7: The optimal dual variables are .

    Since , is NOT a support vector.

    Since and , and are support vectors.

    The minimum number of support vectors is 2.

    Answer: 2.00

    Question 2 · Machine Learning MCQ

    Consider a binary classification dataset with two points: and . We fit a logistic regression model where , with no bias term. Suppose the weight is chosen such that the predicted probability at is exactly .

    Find the value of the gradient of the negative log-likelihood with respect to , evaluated at this weight .

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    C

    Step-by-Step Solution

    Key idea: This is a logistic regression MLE question where we first determine from a probability constraint, then compute the gradient of the negative log-likelihood.

    Step 1: Find from the constraint .

    Since , we have .

    Step 2: Write the negative log-likelihood.

    For logistic regression, the negative log-likelihood is:

    Step 3: Compute the gradient .

    The gradient of the negative log-likelihood for logistic regression is:

    Step 4: Evaluate at .

    For :

    For : (given)

    Answer:

    Question 3 · Machine Learning MSQ

    Consider the dataset with input matrix and target vector . We fit a Ridge regression model without an intercept term, using the regularization parameter . The optimal weight vector is given by .

    Which of the following are correct values of the weight vector for the specified values of ?

    1. A.

      For ,

    2. B.

      For ,

    3. C.

      For ,

    4. D.

      For ,

    Correct Answer:

    ["A","B","D"]

    Step-by-Step Solution

    Key idea: This is a Ridge regression question where the symmetry of the design matrix and target vector simplifies the normal equations, allowing you to solve for the weights without full matrix inversion.

    Step 1: Compute and .

    Step 2: Set up the Ridge normal equations .

    Step 3: Exploit symmetry.

    Since the right-hand side is and the matrix has equal diagonal entries and symmetric off-diagonals, we must have .

    Substituting into the first row: .

    Step 4: Evaluate for each option.

    • For : . (Option A is correct)
    • For : . (Option B is correct)
    • For : . (Option C claims , which is incorrect)
    • For : . (Option D is correct)

    Answer: Options A, B, and D are correct.

    Question 4 · Machine Learning MSQ

    Consider the dataset with input matrix and target vector . We fit an ordinary least squares linear regression model without any regularization. Let be the hat matrix, be the vector of ordinary residuals, and be the Leave-One-Out Cross-Validation (LOOCV) residual for the -th observation.

    Which of the following are correct values for the quantities related to the LOOCV of this model?

    1. A.

      The LOOCV residual for the first observation is $2$

    2. B.

      The LOOCV residual for the second observation is

    3. C.

      The LOOCV mean squared error is $3$

    4. D.

      The LOOCV mean squared error is $9$

    Correct Answer:

    ["A","B","C"]

    Step-by-Step Solution

    Key idea: This is a linear regression diagnostics question that tests the relationship between ordinary residuals, the hat matrix, and LOOCV errors. The key formula is .

    Step 1: Compute and its inverse.

    Step 2: Compute the diagonal elements of the hat matrix .

    Step 3: Compute the OLS estimates , predictions , and ordinary residuals .

    Step 4: Compute the LOOCV residuals.

    Step 5: Compute the LOOCV Mean Squared Error (MSE).

    Answer: Options A, B, and C are correct. Option D is incorrect because it gives the sum of squared errors (9) instead of the mean.

    Question 5 · Machine Learning NAT

    Consider the binary classification dataset with input matrix and labels . We train a logistic regression model (without bias) using the empirical cross-entropy loss . We use gradient descent to minimize . What is the maximum value of the learning rate (rounded to 2 decimal places) such that the gradient descent is guaranteed to converge to the unique global minimum for any initialization ?

    Correct Answer:

    2.67

    Step-by-Step Solution

    Key idea: This is a convergence analysis question for gradient descent on logistic regression. The key observation is that the Lipschitz constant of the gradient is determined by the global maximum of the Hessian, which occurs at where the predictions are most uncertain.

    Step 1: The empirical loss for logistic regression is .

    The gradient is , where .

    The Hessian is , where .

    Step 2: Since , the maximum value of is , achieved when (i.e., ).

    Because has full column rank, is the only point where for all . Thus, the global maximum of the Hessian occurs at , and the Lipschitz constant is .

    Step 3: Compute for the given dataset:

    .

    Step 4: Find the eigenvalues of . The characteristic equation is .

    So .

    Step 5: Calculate the Lipschitz constant .

    For gradient descent to be guaranteed to converge for a convex function with -Lipschitz gradient, the learning rate must satisfy .

    The maximum value of is .

    Answer: 2.67

    Question 6 · Machine Learning NAT

    Consider the binary classification dataset in with three points: with label , with label , and with label . We run the Perceptron learning algorithm starting with the initial weight vector . In each step, the algorithm selects a misclassified point and updates . A point is considered misclassified if . What is the maximum possible number of mistakes the algorithm can make before converging, over all possible sequences of misclassified point selections?

    Correct Answer:

    2.00

    Step-by-Step Solution

    Key idea: This is a Perceptron convergence question where the key observation is that the condition means a point exactly on the decision boundary () counts as a mistake. This boundary condition forces additional updates that students often miss.

    Step 1: Start with . The first point selected will always be a mistake because for any .

    Step 2: To maximize the number of mistakes, we should choose an order that keeps points on the boundary as long as possible. Suppose we select first.

    Update: .

    Step 3: Check the remaining points with :

    • For : (Correct)
    • For : (Mistake! This is the boundary trap.)
    • For : (Correct)

    Step 4: Since is misclassified (on the boundary), we must update:

    .

    Step 5: Check all points with :

    • For : (Correct)
    • For : (Correct)
    • For : (Correct)

    The algorithm converges. Total mistakes = 2.

    Step 6: By symmetry, starting with also leads to exactly 2 mistakes. If we start with , , which correctly classifies all points immediately (1 mistake). Thus, the maximum possible number of mistakes is 2.

    Answer: 2.00

    Question 7 · Machine Learning MCQ

    Consider the four points in with labels: with label , with label , with label , and with label . A hard-margin support vector machine is trained on this dataset. How many of these four points are support vectors of the resulting classifier?

    1. A.

      1

    2. B.

      2

    3. C.

      3

    4. D.

      4

    Correct Answer:

    C

    Step-by-Step Solution

    Key idea: Support vectors are points where exactly. Set up KKT conditions and check which constraints are tight.

    Step 1: Write the constraints.

    For hard-margin SVM, we need for all .

    Step 2: Guess which points are support vectors.

    Point is far from the others in the direction, so it's likely NOT a support vector (it will be well inside the margin). Assume are support vectors.

    Step 3: Solve with tight constraints for .

    (from )

    (from )

    (from )

    (from )

    So , .

    Step 4: Verify is NOT a support vector.

    ✓

    Since , point is strictly inside the margin and is NOT a support vector.

    Step 5: Verify ARE support vectors.

    ✓ (tight)

    ✓ (tight)

    ✓ (tight, since , we need )

    Total support vectors: → 3 points.

    Answer: 3

    Question 8 · Machine Learning MCQ

    Consider the binary classification dataset in with four points:

    , , , .

    We run the perceptron learning algorithm with initial weights , cycling through the points in the order The update rule is: if , then .

    Find the total number of weight updates made by the algorithm before it converges (i.e., completes a full pass through all four points without any update).

    1. A.

      $1$

    2. B.

      $3$

    3. C.

      $4$

    4. D.

      $2$

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: This is a perceptron tracing question. We need to carefully simulate the algorithm step by step, checking the update condition at each step.

    Step 1: Initialize .

    Step 2: Pass through the data (first cycle):

    • Point : . Update: . [Update 1]
    • Point : . No update.
    • Point : . No update.
    • Point : . Update: . [Update 2]

    Step 3: Second cycle:

    • Point : . No update.
    • Point : . No update.
    • Point : . Update: . [Update 3]
    • Point : . No update.

    Step 4: Third cycle:

    • Point : . No update.
    • Point : . No update.
    • Point : . No update.
    • Point : . No update.

    Step 5: The third cycle had no updates, so the algorithm converges.

    Total updates: 3.

    Answer: 3

    Question 9 · Machine Learning MSQ

    Consider the regularized empirical risk minimization problem for a linear classifier with the hinge loss. The objective function for a single weight is given by:

    where , , and the dataset consists of two points: and .

    Let denote a subgradient of at . Evaluate the components of the subgradient at . Which of the following are correct values?

    1. A.

      The subgradient of the regularization term at is $0.5$

    2. B.

      The subgradient of the hinge loss for the first point at is $1$

    3. C.

      The subgradient of the hinge loss for the first point at is

    4. D.

      The total subgradient of at is $1.5$

    Correct Answer:

    ["A","B","D"]

    Step-by-Step Solution

    Key idea: This is an SVM / hinge loss optimization question that requires evaluating the subgradient of a piecewise function. The key is to check the margin for each point to determine if the hinge loss is active (margin < 1) or inactive (margin > 1).

    Step 1: Compute the subgradient of the regularization term.

    The regularization term is .

    Its derivative is .

    At , this is .

    Step 2: Evaluate the hinge loss for the first point .

    The margin is .

    Since , the hinge loss is active. The term is .

    The derivative of with respect to is .

    With the factor, the subgradient is .

    Step 3: Evaluate the hinge loss for the second point .

    The margin is .

    Since , the hinge loss is inactive. The term is .

    The subgradient of an inactive hinge loss is $0$.

    Step 4: Compute the total subgradient.

    .

    Answer: Options A, B, and D are correct. Option C is incorrect because it uses the wrong sign for the derivative of the hinge loss.

    Question 10 · Machine Learning MCQ

    Consider the dataset . LASSO regression with regularization parameter (applied only to the slope coefficient; the intercept is unregularized) is fit to this data. Let be the predicted value at under this LASSO model. Find the value of for which ridge regression (same setup: regularization applied only to the slope, intercept unregularized) yields the same predicted value at .

    1. A.

      0.50

    2. B.

      1.25

    3. C.

      2.50

    4. D.

      5.00

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: Both LASSO and ridge have closed-form solutions for centered 1D data; compute the LASSO prediction first, then match it with the ridge prediction formula.

    Step 1: Center the data.

    ,

    ,

    Step 2: Compute LASSO solution.

    For centered 1D data,

    Step 3: Compute LASSO prediction at .

    Step 4: Compute ridge prediction at as a function of .

    For ridge with centered data:

    Step 5: Set and solve for .

    Answer:

    More practice questions in this unit