chapter

    Chapter 1 — Unsupervised Learning Practice Questions for Gate Da

    Solve 10+ Chapter 1 — Unsupervised 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 the four 2D data points: , , , . We first compute the sample covariance matrix (using divisor , not ), find its first principal component, and project all four points onto this direction. We then run optimal 2-means clustering on the resulting one-dimensional projected data. What is the total within-cluster sum of squares of this optimal 2-means clustering?

    Question 2
    Level 4: Challenger

    Consider a graph with 4 nodes. The edges are with weight , with weight $1$, with weight $1$, and with weight $1$. A student computes the unnormalized Laplacian as instead of the correct .

    For , the student finds the sum of the cubes of the eigenvalues of , call it .

    For , the student finds the sum of the cubes of the eigenvalues of , call it .

    What is the value of ?

    Question 3
    Level 4: Challenger

    Consider a 1D dataset with two points: and . We fit a Gaussian Mixture Model with two components using the EM algorithm. The initial parameters are:

    Means:

    Variances:

    Mixing coefficients:

    After exactly one full iteration of the EM algorithm (one E-step followed by one M-step), which of the following are the correct updated parameters?

    Question 4
    Level 4: Challenger

    Consider 6 points on the real line: . We run DBSCAN with and . A student incorrectly uses squared Euclidean distance and compares it to (instead of ). Which of the following statements are correct?

    Question 5
    Level 4: Challenger

    Consider four data points on the real line: , , , and . We initialize a 2-means clustering using the K-Means++ algorithm. The first center is chosen as , and the second center is chosen as . After this initialization, we perform exactly one full iteration of Lloyd's algorithm (one assignment step followed by one update step). What is the value of the K-Means objective function (the total within-cluster sum of squared distances to the new centroids) after this single iteration? (Round off to 2 decimal places)

    Question 6
    Level 4: Challenger

    Consider a clustering of data points into 3 clusters , , . For a specific point , define:

    • = average distance from to other points in
    • = average distance from to points in
    • = average distance from to points in

    Due to the geometry of the clustering, we know that , , and .

    The silhouette coefficient of is defined as , where .

    Find the maximum possible value of over all valid configurations. Round your answer to 2 decimal places.

    Question 7
    Level 4: Challenger

    Consider three data points with the following kernel matrix :

    We partition the points into two clusters: and . The Kernel K-means objective function is defined as:

    What is the value of for this partition?

    Question 8
    Level 4: Challenger

    Consider a graph with 4 nodes and the following symmetric affinity matrix :

    We perform label propagation with initial labels (nodes 1 and 2 are labeled, nodes 3 and 4 are unlabeled). After one iteration using the random walk normalized propagation matrix (where is the degree matrix), and clamping the labeled nodes to their initial values, which of the following are correct?

    Question 9
    Level 4: Challenger

    In a market basket analysis with transactions, we have items and . The following values are observed:

    Find the minimum value of for which all these values are exactly achievable (i.e., all counts are integers). If no such exists, enter 0.

    Question 10
    Level 4: Challenger

    Consider four points on the real line: , , , . A student runs single-linkage hierarchical clustering but computes pairwise distances as instead of (a sign error). The student merges the pair with the smallest (most negative) distance at each step. What is the distance value at which all four points are finally merged into a single cluster?

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

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

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

    Question 1 · Machine Learning MCQ

    Consider the four 2D data points: , , , . We first compute the sample covariance matrix (using divisor , not ), find its first principal component, and project all four points onto this direction. We then run optimal 2-means clustering on the resulting one-dimensional projected data. What is the total within-cluster sum of squares of this optimal 2-means clustering?

    1. A.

      0.50

    2. B.

      1.00

    3. C.

      2.00

    4. D.

      4.00

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: this is a PCA-then-K-means pipeline question. The projection direction is the eigenvector of the covariance matrix corresponding to its largest eigenvalue; the within-cluster sum of squares is computed on the projected scalars, not the original 2D points.

    Step 1: The data is already centered (mean is ). Compute :

    The covariance matrix is .

    Step 2: Eigenvalues of satisfy , so , giving and . The eigenvector for satisfies , i.e. . Normalized: .

    Step 3: Project each point onto :

    Step 4: Run 2-means on . The optimal partition is and , with means and .

    Step 5: Compute WCSS:

    Answer: 1.00

    Question 2 · Machine Learning MCQ

    Consider a graph with 4 nodes. The edges are with weight , with weight $1$, with weight $1$, and with weight $1$. A student computes the unnormalized Laplacian as instead of the correct .

    For , the student finds the sum of the cubes of the eigenvalues of , call it .

    For , the student finds the sum of the cubes of the eigenvalues of , call it .

    What is the value of ?

    1. A.

      128

    2. B.

      -128

    3. C.

      32

    4. D.

      -32

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: this is a casework question on the Graph Laplacian. The student's sign error means the eigenvalues of are the negatives of the eigenvalues of . The sum of cubes of the eigenvalues of is the negative of the sum of cubes for .

    Step 1: Analyze the case (cycle graph ).

    The correct Laplacian for has eigenvalues .

    The sum of cubes for is .

    Since , the eigenvalues of are .

    The sum of cubes for is .

    Step 2: Analyze the case (path graph ).

    When , the edge is removed. The graph is a path .

    The correct Laplacian for a path of 4 nodes has eigenvalues .

    The sum of cubes for is:

    .

    Since , the sum of cubes for is .

    Step 3: Compute the final sum.

    .

    Answer: -128

    Question 3 · Machine Learning MSQ

    Consider a 1D dataset with two points: and . We fit a Gaussian Mixture Model with two components using the EM algorithm. The initial parameters are:

    Means:

    Variances:

    Mixing coefficients:

    After exactly one full iteration of the EM algorithm (one E-step followed by one M-step), which of the following are the correct updated parameters?

    1. A.

    2. B.

      \mu_1^{new} = rac{2}{e+1}

    3. C.

      \sigma_1^{2, new} = rac{2(1+e^2)}{(e+1)^2}

    4. D.

      \mu_2^{new} = rac{2}{e+1}

    Correct Answer:

    ["A","B"]

    Step-by-Step Solution

    Key idea: this is a direct-formula question on the EM algorithm for Gaussian Mixture Models. The E-step computes responsibilities using the current parameters, and the M-step updates the parameters using the responsibility-weighted averages.

    Step 1: E-step. Compute the Gaussian densities for each point under each component.

    Step 2: Compute the responsibilities .

    For : , and .

    By symmetry of the setup: , and .

    Step 3: M-step. Compute .

    , and .

    Step 4: Update means .

    .

    .

    Step 5: Update variances .

    .

    Step 6: Update mixing coefficients .

    .

    Answer: A, B

    Question 4 · Machine Learning MSQ

    Consider 6 points on the real line: . We run DBSCAN with and . A student incorrectly uses squared Euclidean distance and compares it to (instead of ). Which of the following statements are correct?

    1. A.

      With correct distance, the number of clusters is 1

    2. B.

      With correct distance, the number of noise points is 1

    3. C.

      With the student's error, the number of clusters is 2

    4. D.

      With the student's error, the number of noise points is 0

    Correct Answer:

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

    Step-by-Step Solution

    Key idea: this is a casework question on DBSCAN. The algorithm classifies points as core, border, or noise based on the number of neighbors within . The student's error is comparing squared distance to instead of , effectively using a much smaller radius.

    Step 1: Compute pairwise distances.

    (Other distances are larger and not needed for .)

    Step 2: Correct algorithm ().

    Core points (at least points within , including self):

    • Point 1: neighbors (3 points) core
    • Point 2: neighbors (3 points) core
    • Point 3: neighbors (4 points) core
    • Point 5: neighbors (3 points) core
    • Point 6: neighbors (2 points) core
    • Point 10: neighbors (1 point) noise

    Cluster formation:

    • Start with point 1 (core). Expand: add 2 (core), 3 (core). From 3, add 5 (core). From 5, add 6 (core).
    • Cluster 1 = .
    • Point 10 is noise.

    Result: 1 cluster, 1 noise point.

    Step 3: Student's error (compare to ).

    This is equivalent to using .

    Core points (neighbors within ):

    • Point 1: neighbors (2 points) core
    • Point 2: neighbors (3 points) core
    • Point 3: neighbors (2 points) core
    • Point 5: neighbors (2 points) core
    • Point 6: neighbors (2 points) core
    • Point 10: neighbors (1 point) noise

    Cluster formation:

    • Start with point 1. Expand: add 2, 3. Cluster 1 = .
    • Next unvisited core: 5. Expand: add 6. Cluster 2 = .
    • Point 10 is noise.

    Result: 2 clusters, 1 noise point.

    Answer: A, B, C

    Question 5 · Machine Learning NAT

    Consider four data points on the real line: , , , and . We initialize a 2-means clustering using the K-Means++ algorithm. The first center is chosen as , and the second center is chosen as . After this initialization, we perform exactly one full iteration of Lloyd's algorithm (one assignment step followed by one update step). What is the value of the K-Means objective function (the total within-cluster sum of squared distances to the new centroids) after this single iteration? (Round off to 2 decimal places)

    Correct Answer:

    4.00

    Step-by-Step Solution

    Key idea: this is a pipeline question combining K-Means++ initialization, Lloyd's assignment/update steps, and the SSE objective. The key insight is that the objective function must be evaluated using the updated centroids, not the initial ones.

    Step 1: Identify the initial centers from the K-Means++ initialization.

    The initial centers are and .

    Step 2: Perform the assignment step.

    Assign each point to the nearest initial center:

    • : distance to 0 is 0, to 8 is 8 assigned to .
    • : distance to 0 is 2, to 8 is 6 assigned to .
    • : distance to 0 is 6, to 8 is 2 assigned to .
    • : distance to 0 is 8, to 8 is 0 assigned to .

    The clusters are and .

    Step 3: Perform the update step.

    Compute the new centroids as the mean of the points in each cluster:

    Step 4: Compute the K-Means objective function (SSE) using the new centroids.

    Answer: 4.00

    Question 6 · Machine Learning NAT

    Consider a clustering of data points into 3 clusters , , . For a specific point , define:

    • = average distance from to other points in
    • = average distance from to points in
    • = average distance from to points in

    Due to the geometry of the clustering, we know that , , and .

    The silhouette coefficient of is defined as , where .

    Find the maximum possible value of over all valid configurations. Round your answer to 2 decimal places.

    Correct Answer:

    0.75

    Step-by-Step Solution

    Key idea: To maximize the silhouette coefficient, we need to maximize and minimize , subject to the constraint that .

    Step 1: Understand the silhouette formula.

    For , we need . In this case, , so:

    Step 2: Maximize by minimizing .

    To minimize , we minimize and maximize .

    Step 3: Find the constraints on .

    and

    So

    The maximum value of is 4.

    Step 4: Find the minimum value of .

    The minimum value of is 1.

    Step 5: Compute the maximum silhouette coefficient.

    Answer: 0.75

    Question 7 · Machine Learning MCQ

    Consider three data points with the following kernel matrix :

    We partition the points into two clusters: and . The Kernel K-means objective function is defined as:

    What is the value of for this partition?

    1. A.

      1

    2. B.

      -2

    3. C.

      -3

    4. D.

      8

    Correct Answer:

    A

    Step-by-Step Solution

    Key idea: this is a direct-formula question on the Kernel K-means objective. The objective measures the within-cluster sum of squares in the feature space, expanded entirely in terms of the kernel matrix entries.

    Step 1: Compute the terms for cluster .

    The sum of diagonal elements is .

    The sum of all pairwise kernel values is .

    The contribution of is .

    Step 2: Compute the terms for cluster .

    The sum of diagonal elements is .

    The sum of all pairwise kernel values is .

    The contribution of is .

    Step 3: Sum the contributions.

    .

    Answer: 1

    Question 8 · Machine Learning MSQ

    Consider a graph with 4 nodes and the following symmetric affinity matrix :

    We perform label propagation with initial labels (nodes 1 and 2 are labeled, nodes 3 and 4 are unlabeled). After one iteration using the random walk normalized propagation matrix (where is the degree matrix), and clamping the labeled nodes to their initial values, which of the following are correct?

    1. A.

      y_3^{(1)} = rac{1}{4}

    2. B.

      y_4^{(1)} = - rac{1}{4}

    3. C.

      y_3^{(1)} = rac{1}{3}

    4. D.

      y_4^{(1)} = rac{1}{4}

    Correct Answer:

    ["A","B"]

    Step-by-Step Solution

    Key idea: this is a direct-formula question on label propagation. The propagation matrix performs a random walk on the graph, and the update rule is followed by clamping labeled nodes.

    Step 1: Compute the degree matrix .

    So .

    Step 2: Compute .

    Step 3: Compute where .

    Step 4: Clamp labeled nodes.

    (clamped)

    (clamped)

    (unchanged)

    (unchanged)

    Answer: A, B

    Question 9 · Machine Learning NAT

    In a market basket analysis with transactions, we have items and . The following values are observed:

    Find the minimum value of for which all these values are exactly achievable (i.e., all counts are integers). If no such exists, enter 0.

    Correct Answer:

    0

    Step-by-Step Solution

    Key idea: The two confidence values impose contradictory constraints on , making it impossible for any .

    Step 1: Express counts in terms of .

    Step 2: Use confidence to find .

    Step 3: Use the other confidence value.

    Step 4: Check for consistency.

    We need , which implies , so .

    Since we require , no valid exists.

    Answer: 0

    Question 10 · Machine Learning MCQ

    Consider four points on the real line: , , , . A student runs single-linkage hierarchical clustering but computes pairwise distances as instead of (a sign error). The student merges the pair with the smallest (most negative) distance at each step. What is the distance value at which all four points are finally merged into a single cluster?

    1. A.

      -8

    2. B.

      -5

    3. C.

      -3

    4. D.

      3

    Correct Answer:

    C

    Step-by-Step Solution

    Key idea: this is a hierarchical clustering question with a procedural trap. The sign error makes some distances negative, and single linkage merges the pair with the smallest (most negative) distance first.

    Step 1: Compute the student's "distances" :

    Step 2: Merge the pair with the smallest (most negative) distance: . Merge .

    Clusters: , , .

    Step 3: Update distances using single linkage (minimum distance between clusters):

    Step 4: Merge the pair with the smallest distance: . Merge .

    Clusters: , .

    Step 5: Update distance:

    Step 6: Merge at distance . All points are now in one cluster.

    Answer: -3

    More practice questions in this unit