chapter

    Chapter 3 — Unit 1 — Machine Learning Practice Questions for Gate Da

    Solve 12+ Chapter 3 — Unit 1 — Machine 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 Support Vector Machine trained on a binary classification dataset of points in , with at least one point in each class. All points lie on the unit sphere, i.e., for all . The SVM is trained without a bias term, so the decision boundary passes through the origin. What is the maximum possible value of the margin ?

    Question 2
    Level 4: Challenger

    A logistic regression model is trained on a balanced binary classification dataset. At a particular test point, the model outputs . The cost of a false negative is 4 times the cost of a false positive. To minimize expected cost, the decision rule is to predict class 1 if and only if . What is the value of , and what is the prediction at this test point?

    Question 3
    Level 4: Challenger

    Consider a centered dataset in with covariance matrix

    If the data is projected onto the subspace spanned by the first two principal components, what is the expected squared reconstruction error per data point?

    Question 4
    Level 4: Challenger

    Consider a linear regression model with observations and parameters (including the intercept). The hat matrix is , and its diagonal elements are . Let be the -th training residual. The leave-one-out cross-validation (LOOCV) residual is given by .

    Which of the following statements about the values and properties of and are correct?

    Question 5
    Level 4: Challenger

    Let be a dataset of distinct points in , each labeled or . Let be the number of misclassifications when the 1-Nearest Neighbor classifier is evaluated using Leave-One-Out Cross-Validation on . Which of the following statements are ALWAYS true?

    Question 6
    Level 4: Challenger

    Consider a dataset of distinct points in . The data matrix is of size . We center the data by subtracting the mean of each feature to obtain the centered data matrix . We then compute the sample covariance matrix . What is the maximum possible number of strictly positive eigenvalues of ?

    Question 7
    Level 4: Challenger

    Consider a binary classification dataset of points in () in general position that is linearly separable. We train a hard-margin Support Vector Machine. Which of the following statements about the number of support vectors (SVs) are TRUE?

    Question 8
    Level 4: Challenger

    Consider a set of distinct points on the real line. Let be the hypothesis class of all unions of at most disjoint closed intervals on . Which of the following statements are TRUE?

    Question 9
    Level 4: Challenger

    Consider LASSO regression with a single feature and no intercept. Given one training point , the objective is to minimize with . What is the optimal value of ?

    Question 10
    Level 4: Challenger

    Consider a 1D linear Support Vector Machine with no bias term, trained on a single point with regularization parameter . The objective function is

    At the current weight , a gradient descent step of size is taken. What is the new weight ?

    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 — Unit 1 — Machine Learning Practice Questions for GATE DA

    Solve 12+ Chapter 3 — Unit 1 — Machine Learning practice questions for GATE DA with answers and detailed solutions. Free sample questions below.

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

    Question 1 · Machine Learning NAT

    Consider a hard-margin Support Vector Machine trained on a binary classification dataset of points in , with at least one point in each class. All points lie on the unit sphere, i.e., for all . The SVM is trained without a bias term, so the decision boundary passes through the origin. What is the maximum possible value of the margin ?

    Correct Answer:

    2.00

    Step-by-Step Solution

    Key idea: This is an optimization question with geometric constraints. To maximize the margin , we must minimize . The constraints of the SVM combined with the unit sphere condition provide a lower bound on via the Cauchy-Schwarz inequality.

    Step 1: The hard-margin SVM without a bias term solves subject to for all .

    Step 2: The margin is defined as . Maximizing is equivalent to minimizing .

    Step 3: From the constraints, we have for all .

    Step 4: Since , we have . By the Cauchy-Schwarz inequality, .

    Step 5: We are given that all points lie on the unit sphere, so . Thus, .

    Step 6: Combining the inequalities, we get , which implies .

    Step 7: Therefore, the margin .

    Step 8: This maximum margin of 2 is achievable when all positive points are at some unit vector and all negative points are at , with .

    Answer: 2.00

    Question 2 · Machine Learning MCQ

    A logistic regression model is trained on a balanced binary classification dataset. At a particular test point, the model outputs . The cost of a false negative is 4 times the cost of a false positive. To minimize expected cost, the decision rule is to predict class 1 if and only if . What is the value of , and what is the prediction at this test point?

    1. A.

      , predict class 1

    2. B.

      , predict class 0

    3. C.

      , predict class 0

    4. D.

      , predict class 0

    Correct Answer:

    A

    Step-by-Step Solution

    Key idea: In cost-sensitive classification, the optimal threshold balances the expected costs of false positives and false negatives.

    Step 1: Let . Then .

    Step 2: Expected cost of predicting 1: .

    Step 3: Expected cost of predicting 0: .

    Step 4: Predict 1 if , which simplifies to .

    Step 5: Since , predict class 1.

    Answer: , predict class 1.

    Question 3 · Machine Learning MCQ

    Consider a centered dataset in with covariance matrix

    If the data is projected onto the subspace spanned by the first two principal components, what is the expected squared reconstruction error per data point?

    1. A.

      $3$

    2. B.

      $9$

    3. C.

      $2$

    4. D.

      $11$

    Correct Answer:

    C

    Step-by-Step Solution

    Key idea: The expected squared reconstruction error in PCA is exactly the sum of the eigenvalues corresponding to the discarded principal components.

    Step 1: The total variance of the data is the trace of , which is .

    Step 2: Find the eigenvalues of . The matrix is block-diagonal. The block has eigenvalues , so $6$ and $2$. The block gives eigenvalue $3$.

    Step 3: The eigenvalues are . The first two principal components correspond to the largest eigenvalues: $6$ and $3$.

    Step 4: The variance captured by the first two PCs is .

    Step 5: The expected squared reconstruction error is the variance of the discarded PC, which is the smallest eigenvalue: $2$.

    Answer: 2.

    Question 4 · Machine Learning MSQ

    Consider a linear regression model with observations and parameters (including the intercept). The hat matrix is , and its diagonal elements are . Let be the -th training residual. The leave-one-out cross-validation (LOOCV) residual is given by .

    Which of the following statements about the values and properties of and are correct?

    1. A.

      The sum is exactly equal to .

    2. B.

      If and , then .

    3. C.

      If and , then .

    4. D.

      The sum is exactly equal to .

    Correct Answer:

    ["A","B"]

    Step-by-Step Solution

    Key idea: This question synthesizes the algebraic properties of the hat matrix in linear regression with the closed-form formula for Leave-One-Out Cross-Validation (LOOCV).

    Step 1: Analyze the sum of the diagonal elements of the hat matrix . The hat matrix is defined as . Using the cyclic property of the trace, . Thus, the sum of the leverage scores is exactly . Option A is correct, and Option D is incorrect.

    Step 2: Evaluate the LOOCV residual using the given formula . For and , we substitute these values directly: . Option B is correct.

    Step 3: Identify the trap in Option C. A common mistake is to divide by instead of , which would yield . This is incorrect.

    Answer: Options A and B are correct.

    Question 5 · Machine Learning MSQ

    Let be a dataset of distinct points in , each labeled or . Let be the number of misclassifications when the 1-Nearest Neighbor classifier is evaluated using Leave-One-Out Cross-Validation on . Which of the following statements are ALWAYS true?

    1. A.

    2. B.

      If is even, it is possible to construct such that .

    3. C.

      If is odd, it is possible to construct such that .

    4. D.

      can never exceed .

    Correct Answer:

    ["A","B"]

    Step-by-Step Solution

    Key idea: In 1-NN LOOCV, a misclassification occurs when a point's nearest neighbor has a different label. For this to happen mutually and maximize errors, points must form isolated pairs.

    Step 1: If point is misclassified, its nearest neighbor must have a different label.

    Step 2: For to also be misclassified, its nearest neighbor must be (or another point with a different label). To maximize errors, we pair them up: and are each other's nearest neighbors, and have different labels. This gives 2 errors per pair.

    Step 3: Thus, misclassified points must come in mutual nearest-neighbor pairs. The total number of misclassified points must be even.

    Step 4: If is even, we can form pairs, giving . If is odd, we can form at most pairs, giving .

    Step 5: Therefore, is always true. is possible for even , but impossible for odd .

    Answer: A, B.

    Question 6 · Machine Learning NAT

    Consider a dataset of distinct points in . The data matrix is of size . We center the data by subtracting the mean of each feature to obtain the centered data matrix . We then compute the sample covariance matrix . What is the maximum possible number of strictly positive eigenvalues of ?

    Correct Answer:

    14.00

    Step-by-Step Solution

    Key idea: The number of strictly positive eigenvalues of the covariance matrix is equal to the rank of the centered data matrix . The rank of is bounded by both the number of samples minus one (due to centering) and the number of features.

    Step 1: The sample covariance matrix is . The number of strictly positive eigenvalues of is the rank of , which is equal to the rank of .

    Step 2: The matrix is of size . The rank of any matrix is at most .

    Step 3: However, the columns of sum to the zero vector because we subtracted the mean of each feature. This means the rows of are linearly dependent (their sum is the zero vector).

    Step 4: This linear dependence reduces the maximum possible rank by 1. Therefore, the rank of is at most .

    Step 5: Combining the bounds, the maximum possible rank of is .

    Step 6: Substituting and , we get .

    Answer: 14.00

    Question 7 · Machine Learning MSQ

    Consider a binary classification dataset of points in () in general position that is linearly separable. We train a hard-margin Support Vector Machine. Which of the following statements about the number of support vectors (SVs) are TRUE?

    1. A.

      The maximum possible number of SVs is .

    2. B.

      The minimum possible number of SVs is 2.

    3. C.

      The minimum possible number of SVs is .

    4. D.

      The maximum possible number of SVs is .

    Correct Answer:

    ["A","B"]

    Step-by-Step Solution

    Key idea: The support vectors are the points that lie exactly on the margin hyperplanes. The margin is the distance between the convex hulls of the two classes, and its orientation is determined by the closest points between these hulls.

    Step 1: Analyze the maximum number of SVs.

    In the extreme case, all data points can lie exactly on the two margin hyperplanes. Since there is no geometric constraint preventing this (other than linear separability, which is given), the maximum possible number of support vectors is . (Option A is TRUE, Option D is FALSE).

    Step 2: Analyze the minimum number of SVs.

    The margin is defined by the closest points between the convex hulls of the two classes. Even if the points are in general position, the closest points between two convex sets can be just a single point from each class. The margin hyperplanes will be orthogonal to the line connecting these 2 points. Thus, the minimum possible number of support vectors is 2. (Option B is TRUE).

    Step 3: Address the boundary trap.

    A common misconception is that a -dimensional hyperplane requires points to be uniquely defined. While true for a general hyperplane in arbitrary position, the SVM margin hyperplane's orientation is fixed by the 2 closest points of the convex hulls. It does not require support vectors to be defined. (Option C is FALSE).

    Answer: A, B

    Question 8 · Machine Learning MSQ

    Consider a set of distinct points on the real line. Let be the hypothesis class of all unions of at most disjoint closed intervals on . Which of the following statements are TRUE?

    1. A.

      The minimum such that can shatter is exactly .

    2. B.

      If , the minimum required to shatter is 3.

    3. C.

      If , the minimum required to shatter is 5, since in the worst case each point must be covered by a separate interval.

    4. D.

      If , the minimum required to shatter is 2.

    Correct Answer:

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

    Step-by-Step Solution

    Key idea: To shatter points on a line, the hardest subset to form is the alternating one (1st, 3rd, 5th...), which requires the maximum number of disjoint intervals.

    Step 1: Any subset of can be formed by a union of disjoint intervals. The number of intervals needed is the number of "blocks" of consecutive selected points.

    Step 2: To maximize the number of blocks, we select points such that no two are consecutive. This is the alternating subset:

    Step 3: The size of this alternating subset is . Since no two are consecutive, each forms its own block, requiring intervals.

    Step 4: Assume for contradiction that . Then we cannot form the alternating subset, which requires intervals. Contradiction. Thus, we need at least .

    Step 5: Conversely, intervals are always sufficient, because any subset has at most blocks.

    Step 6: For , . For , .

    Answer: A, B, D.

    Question 9 · Machine Learning MCQ

    Consider LASSO regression with a single feature and no intercept. Given one training point , the objective is to minimize with . What is the optimal value of ?

    1. A.

      $0.5$

    2. B.

    3. C.

      $2$

    4. D.

      $0$

    Correct Answer:

    A

    Step-by-Step Solution

    Key idea: LASSO with a single data point reduces to a 1D optimization with a non-differentiable penalty, requiring case analysis.

    Step 1: Write the objective .

    Step 2: Case : . Setting gives . Check: .

    Step 3: Case : . Setting gives , which is not in . Reject.

    Step 4: Case : .

    Step 5: Compare: . The minimum is at .

    Answer: .

    Question 10 · Machine Learning MCQ

    Consider a 1D linear Support Vector Machine with no bias term, trained on a single point with regularization parameter . The objective function is

    At the current weight , a gradient descent step of size is taken. What is the new weight ?

    1. A.

      $0.5$

    2. B.

      $0.3$

    3. C.

      $1.7$

    4. D.

      $1.5$

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: This requires casework to determine if the hinge loss is active, computing the correct subgradient (watching for sign errors), and applying the gradient descent update rule.

    Step 1: Evaluate the margin for the current weight . We have .

    Step 2: Since , the hinge loss is active. The loss term is .

    Step 3: Compute the subgradient of with respect to . For the active region, . The derivative is .

    Step 4: Substitute the values: . (Note: the derivative of is , a common source of sign errors).

    Step 5: Apply the gradient descent update: .

    Answer: 0.3.

    More practice questions in this unit