Question 1 of 50
What is the primary characteristic of Unsupervised Learning?
A
The algorithm uses a feedback loop for rewards
B
The algorithm trains on labeled data
C
The algorithm predicts a continuous numerical value
D
The algorithm trains on data without labels
Not quite. Try another option.
Answer: The algorithm trains on data without labels
Unsupervised learning deals with input data that does not have corresponding output labels, aiming to find hidden structures.
Question 2 of 50
Which of the following is a primary goal of clustering?
A
To group similar data points together
B
To predict future values based on past trends
C
To classify images into predefined categories
D
To reduce the noise in a signal
Not quite. Try another option.
Answer: To group similar data points together
Clustering aims to partition data such that points within a group are similar to each other and different from points in other groups.
Question 3 of 50
In the context of K-Means, what does 'K' represent?
A
The number of data points
B
The dimension of the features
C
The number of iterations
D
The number of clusters
Not quite. Try another option.
Answer: The number of clusters
K represents the pre-defined number of clusters the algorithm attempts to identify in the dataset.
Question 4 of 50
What kind of problem is K-Means designed to solve?
A
Classification
B
Regression
C
Clustering
D
Reinforcement Learning
Not quite. Try another option.
Answer: Clustering
K-Means is a popular unsupervised algorithm used for clustering analysis.
Question 5 of 50
What is a 'centroid' in the K-Means algorithm?
A
The boundary line between clusters
B
The data point furthest from the center
C
An outlier in the dataset
D
The geometric center of a cluster
Not quite. Try another option.
Answer: The geometric center of a cluster
A centroid represents the mean position of all the data points belonging to a specific cluster.
Question 6 of 50
Which distance metric is most commonly used in standard K-Means?
A
Manhattan distance
B
Hamming distance
C
Cosine similarity
D
Euclidean distance
Not quite. Try another option.
Answer: Euclidean distance
Standard K-Means typically minimizes the within-cluster sum of squared Euclidean distances.
Question 7 of 50
What is the first step of the K-Means algorithm?
A
Update the centroids
B
Calculate the total error
C
Assign points to the nearest cluster
D
Initialize cluster centroids
Not quite. Try another option.
Answer: Initialize cluster centroids
The algorithm begins by selecting K initial centroids, either randomly or using specific heuristics.
Question 8 of 50
During the assignment step of K-Means, how is a data point assigned to a cluster?
A
To the cluster with the closest centroid
B
To the cluster with the highest variance
C
To the cluster with the most points
D
Randomly
Not quite. Try another option.
Answer: To the cluster with the closest centroid
Each data point is assigned to the cluster whose centroid is nearest to it based on the distance metric.
Question 9 of 50
What happens during the update step of the K-Means algorithm?
A
The number of clusters (K) is increased
B
Points are reassigned to different clusters
C
New data points are added
D
Centroids are moved to the mean of their assigned points
Not quite. Try another option.
Answer: Centroids are moved to the mean of their assigned points
After points are assigned, the new position of the centroid is calculated as the average (mean) of all points currently in that cluster.
Question 10 of 50
When does the K-Means algorithm stop iterating?
A
When the centroids do not change significantly
B
When the training error is zero
C
When K is equal to N
D
After exactly 10 iterations
Not quite. Try another option.
Answer: When the centroids do not change significantly
Convergence is reached when centroids stabilize (don't move) or point assignments stop changing.
Question 11 of 50
What is the optimization objective (cost function) of K-Means?
A
Minimize Within-Cluster Sum of Squares (WCSS)
B
Maximize Inter-cluster distance
C
Minimize the number of clusters
D
Maximize the Silhouette score
Not quite. Try another option.
Answer: Minimize Within-Cluster Sum of Squares (WCSS)
K-Means tries to minimize the sum of squared distances between data points and their respective cluster centroids (Inertia).
Question 12 of 50
The objective function of K-Means is non-convex. What does this imply?
A
It requires labeled data
B
It always finds the global minimum
C
It cannot be optimized
D
It may get stuck in a local minimum
Not quite. Try another option.
Answer: It may get stuck in a local minimum
Because the function is non-convex, the final result depends on the initialization, and it is not guaranteed to find the absolute best clustering.
Question 13 of 50
Which of the following is a disadvantage of the K-Means algorithm?
A
It is sensitive to outliers
B
It works only on labeled data
C
It cannot handle numerical data
D
It is computationally very expensive for small datasets
Not quite. Try another option.
Answer: It is sensitive to outliers
Outliers can significantly shift the mean (centroid), affecting the assignment of other points and distorting the clusters.
Question 14 of 50
If you set K equal to the number of data points (N), what will the WCSS be?
A
Infinity
B
Undefined
C
Maximum possible value
D
Zero
Not quite. Try another option.
Answer: Zero
If every point is its own cluster, the distance between the point and its centroid is zero, resulting in a total WCSS of zero.
Question 15 of 50
What is the 'Elbow Method' used for?
A
Determining the optimal number of clusters (K)
B
Initializing centroids
C
Handling outliers
D
Speeding up convergence
Not quite. Try another option.
Answer: Determining the optimal number of clusters (K)
The Elbow Method plots WCSS against K to find the point where adding more clusters yields diminishing returns.
Question 16 of 50
In the Elbow Method plot, what is typically on the Y-axis?
A
Time taken
B
Inertia or WCSS
C
Accuracy
D
Number of clusters (K)
Not quite. Try another option.
Answer: Inertia or WCSS
The Y-axis represents the cost (Within-Cluster Sum of Squares), while the X-axis represents the number of clusters.
Question 17 of 50
What is the 'Random Initialization Trap' in K-Means?
A
Choosing K randomly leads to errors
B
Randomly picking centroids can lead to poor local optima
C
The algorithm fails if data is random
D
Random data points cannot be clustered
Not quite. Try another option.
Answer: Randomly picking centroids can lead to poor local optima
Poor random choices for initial centroids can result in sub-optimal clustering or slower convergence.
Question 18 of 50
What is K-Means++?
A
A post-processing step for K-Means
B
A version of K-Means for supervised learning
C
A method to choose the optimal K
D
A smarter initialization technique for K-Means
Not quite. Try another option.
Answer: A smarter initialization technique for K-Means
K-Means++ initializes centroids to be far apart from each other, improving convergence speed and result quality.
Question 19 of 50
How does K-Means++ select the first centroid?
A
It picks the point with the highest variance
B
It calculates the global mean
C
It picks one data point uniformly at random
D
It chooses the point furthest from the origin
Not quite. Try another option.
Answer: It picks one data point uniformly at random
The first centroid is chosen randomly; subsequent centroids are chosen based on probability proportional to distance squared.
Question 20 of 50
What is the difference between Hard Clustering and Soft Clustering?
A
Hard clustering is faster; Soft is slower
B
Hard clustering assigns a point to one cluster; Soft assigns probabilities
C
Hard clustering uses K-Means; Soft uses Decision Trees
D
Hard clustering allows overlapping; Soft does not
Not quite. Try another option.
Answer: Hard clustering assigns a point to one cluster; Soft assigns probabilities
In hard clustering, a point belongs to exactly one cluster. In soft clustering, a point has a degree of membership to all clusters.
Question 21 of 50
Standard K-Means is an example of which type of clustering?
A
Hard Clustering
B
Soft Clustering
C
Density-based Clustering
D
Hierarchical Clustering
Not quite. Try another option.
Answer: Hard Clustering
Standard K-Means assigns each point to the specific cluster with the nearest centroid, implying binary membership.
Question 22 of 50
Which algorithm is a well-known example of Soft Clustering?
A
Fuzzy C-Means
B
Agglomerative Clustering
C
K-Means
D
DBSCAN
Not quite. Try another option.
Answer: Fuzzy C-Means
Fuzzy C-Means allows data points to belong to multiple clusters with varying degrees of membership.
Question 23 of 50
If a data point has a membership vector [0.7, 0.2, 0.1] for 3 clusters, this is an example of:
A
Hard Clustering
B
Soft Clustering
C
Outlier Detection
D
Regression
Not quite. Try another option.
Answer: Soft Clustering
The vector indicates probabilities or weights of belonging to different clusters, characteristic of soft clustering.
Question 24 of 50
What shape of clusters does K-Means typically assume?
A
Spirals
B
Spherical or convex
C
Elongated shapes
D
Arbitrary shapes
Not quite. Try another option.
Answer: Spherical or convex
Because it relies on Euclidean distance and means, K-Means works best on spherical, convex clusters.
Question 25 of 50
Why is feature scaling (standardization/normalization) important in K-Means?
A
To ensure the algorithm runs faster only
B
To convert categorical data to numerical
C
To prevent features with larger ranges from dominating the distance metric
D
It is not important
Not quite. Try another option.
Answer: To prevent features with larger ranges from dominating the distance metric
Since K-Means uses distance, a feature with a range of 0-1000 will overpower a feature with a range of 0-1 if not scaled.
Question 26 of 50
What is the computational complexity of one iteration of K-Means?
A
O(e^N)
B
O(K N d)
C
O(N * log N)
D
O(N^2)
Not quite. Try another option.
Answer: O(K N d)
Where K is clusters, N is data points, and d is dimensions. It is linear with respect to N.
Question 27 of 50
In the Elbow method, the 'elbow' point represents:
A
The point where K equals 1
B
The point where adding another cluster does not significantly reduce WCSS
C
The point of maximum error
D
The point where WCSS becomes zero
Not quite. Try another option.
Answer: The point where adding another cluster does not significantly reduce WCSS
It indicates the optimal trade-off between minimizing error and minimizing model complexity (number of clusters).
Question 28 of 50
Which of the following implies that K-Means has converged?
A
The data becomes labeled
B
The assignment of points to clusters remains unchanged
C
WCSS increases
D
The number of clusters decreases
Not quite. Try another option.
Answer: The assignment of points to clusters remains unchanged
If point assignments don't change, centroids won't change, and the algorithm has reached a stable state.
Question 29 of 50
What is 'Inertia' in the context of Scikit-Learn's K-Means implementation?
A
The distance between cluster centers
B
The sum of squared distances of samples to their closest cluster center
C
The number of iterations
D
The time taken to run
Not quite. Try another option.
Answer: The sum of squared distances of samples to their closest cluster center
Inertia is the specific term used in Scikit-Learn for WCSS (Within-Cluster Sum of Squares).
Question 30 of 50
Which strategy is used to mitigate the local optima problem in K-Means?
A
Increase the number of clusters
B
Use Manhattan distance
C
Decrease the learning rate
D
Run the algorithm multiple times with different initializations
Not quite. Try another option.
Answer: Run the algorithm multiple times with different initializations
Running the algorithm multiple times (n_init) and choosing the result with the lowest WCSS helps avoid local optima.
Question 31 of 50
Can K-Means handle categorical data directly?
A
Only if the data is ordinal
B
Yes, it works natively
C
No, it requires numerical data
D
Yes, using Hamming distance
Not quite. Try another option.
Answer: No, it requires numerical data
Standard K-Means relies on means and Euclidean distance, which are undefined for categorical data (though K-Modes exists for that).
Question 32 of 50
In K-Means++, how is the probability of selecting the next centroid determined?
A
Proportional to the squared distance from the nearest existing centroid
B
Inversely proportional to the distance from existing centroids
C
Based on the density of the points
D
Randomly with uniform distribution
Not quite. Try another option.
Answer: Proportional to the squared distance from the nearest existing centroid
This ensures that new centroids are likely to be far away from existing ones, spreading them out.
Question 33 of 50
What is a 'Voronoi Diagram' in relation to K-Means?
A
A plot of the cost function
B
A method to initialize K
C
A visualization where regions are defined by the closest centroid
D
A type of soft clustering
Not quite. Try another option.
Answer: A visualization where regions are defined by the closest centroid
The partitions created by K-Means can be visualized as Voronoi cells, separating the space based on distance to centroids.
Question 34 of 50
If the clusters in the data are of very different densities and sizes, K-Means will:
A
Automatically adjust the metric
B
Merge the clusters
C
Likely fail to identify the correct clusters
D
Perform perfectly
Not quite. Try another option.
Answer: Likely fail to identify the correct clusters
K-Means assumes clusters are roughly spherical and of similar size/density; it struggles with varying densities.
Question 35 of 50
Which step ensures K-Means is an unsupervised algorithm?
A
Not using target labels for training
B
Calculating the mean
C
Iterating until convergence
D
Minimizing WCSS
Not quite. Try another option.
Answer: Not using target labels for training
The defining feature is that it structures the data based on intrinsic properties rather than external labels.
Question 36 of 50
In the equation for WCSS, what is being squared?
A
The distance between two centroids
B
The distance between a point and its assigned centroid
C
The number of clusters
D
The number of iterations
Not quite. Try another option.
Answer: The distance between a point and its assigned centroid
WCSS sums the squared Euclidean distances between points and their cluster centers.
Question 37 of 50
Why is it often difficult to pick the optimal K using the Elbow method?
A
The plot is always a straight line
B
It requires labeled data
C
It takes too long to compute
D
The 'elbow' might not be sharp or clear
Not quite. Try another option.
Answer: The 'elbow' might not be sharp or clear
Sometimes the curve is smooth, making the choice of the 'elbow' point subjective.
Question 38 of 50
What is the primary role of the 'Coordinate Descent' concept in K-Means?
A
It calculates the distance
B
It is used to visualize data
C
It is used for initialization
D
It is the method used to optimize the objective function
Not quite. Try another option.
Answer: It is the method used to optimize the objective function
K-Means optimizes the cost function by alternating between two steps (assignment and update), effectively performing coordinate descent.
Question 39 of 50
If you perform K-Means on a dataset with 2 distinct well-separated blobs but set K=4, what happens?
A
It merges the blobs
B
The algorithm crashes
C
It splits the natural blobs into smaller clusters
D
It finds 2 clusters and ignores the other 2
Not quite. Try another option.
Answer: It splits the natural blobs into smaller clusters
The algorithm is forced to find 4 clusters, so it will partition the natural blobs to satisfy the requirement.
Question 40 of 50
In Soft Clustering, the sum of membership weights for a single data point across all clusters usually equals:
A
0
B
K
C
1
D
100
Not quite. Try another option.
Answer: 1
The weights represent probabilities or proportions, so they must sum to 1 for a given data point.
Question 41 of 50
Which of the following is NOT an application of K-Means?
A
Document Clustering
B
Customer Segmentation
C
Image Compression (Color Quantization)
D
Spam Classification (Supervised)
Not quite. Try another option.
Answer: Spam Classification (Supervised)
Spam classification is typically a supervised learning task (e.g., Naive Bayes, SVM), not clustering.
Question 42 of 50
Does K-Means guarantee finding the global optimum for the WCSS?
A
Only if using Manhattan distance
B
Yes, if K is small
C
No, it depends on initialization
D
Yes, always
Not quite. Try another option.
Answer: No, it depends on initialization
K-Means converges to a local optimum, which is why multiple initializations are often used.
Question 43 of 50
The computational cost of the distance calculation step for one point against K centroids is proportional to:
A
1
B
N
C
N^2
D
K
Not quite. Try another option.
Answer: K
For one point, you must calculate the distance to each of the K centroids.
Question 44 of 50
Which component constitutes the 'model' after training K-Means?
A
The coordinates of the final centroids
B
The list of outliers
C
The Elbow plot
D
The original dataset
Not quite. Try another option.
Answer: The coordinates of the final centroids
The centroids define the clusters; new data can be assigned to clusters based on these centroid locations.
Question 45 of 50
What is the relationship between Within-Cluster variance and Between-Cluster variance in a good clustering?
A
High within-cluster, Low between-cluster
B
Low within-cluster, High between-cluster
C
High within-cluster, High between-cluster
D
Low within-cluster, Low between-cluster
Not quite. Try another option.
Answer: Low within-cluster, High between-cluster
Good clusters have points tight together (low internal variance) and far apart from other clusters (high external variance).
Question 46 of 50
Lloyd's Algorithm is another name for:
A
DBSCAN
B
K-Means Algorithm
C
Hierarchical Clustering
D
KNN
Not quite. Try another option.
Answer: K-Means Algorithm
Standard K-Means is frequently referred to as Lloyd's algorithm.
Question 47 of 50
In the context of image segmentation, what does a pixel represent in K-Means?
A
A label
B
A cluster
C
A data point
D
A centroid
Not quite. Try another option.
Answer: A data point
Each pixel (often represented by RGB values) is treated as a data point to be clustered based on color similarity.
Question 48 of 50
Why might one choose a K value slightly different from the Elbow point?
A
Because the Elbow method is always wrong
B
To increase computational cost
C
Based on business requirements or downstream tasks
D
To maximize WCSS
Not quite. Try another option.
Answer: Based on business requirements or downstream tasks
Domain knowledge (e.g., needing exactly 3 t-shirt sizes: S, M, L) often overrides the purely mathematical suggestion of the Elbow method.
Question 49 of 50
If K=1, the centroid location will be:
A
The origin (0,0)
B
Undefined
C
The mean of the entire dataset
D
A random data point
Not quite. Try another option.
Answer: The mean of the entire dataset
With one cluster, the centroid minimizes distance to all points, which is the global arithmetic mean.
Question 50 of 50
What happens if a cluster becomes empty during K-Means iterations?
A
It is ignored and WCSS becomes 0
B
The K value increases
C
The empty cluster is usually re-initialized or removed
D
The algorithm stops
Not quite. Try another option.
Answer: The empty cluster is usually re-initialized or removed
Implementations typically handle this by resetting the centroid to a random point or the point furthest from its current centroid.