0
0
ML Pythonprogramming~5 mins

K-Means clustering in ML Python - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the main goal of K-Means clustering?
The main goal of K-Means clustering is to group data points into K clusters where each point belongs to the cluster with the nearest mean, minimizing the distance within clusters.
Click to reveal answer
beginner
How does K-Means algorithm update cluster centers during training?
K-Means updates cluster centers by calculating the mean (average) of all data points assigned to each cluster, then moving the center to this mean position.
Click to reveal answer
beginner
What is the role of the 'K' in K-Means clustering?
'K' represents the number of clusters you want to divide your data into before running the algorithm.
Click to reveal answer
intermediate
Why might K-Means clustering give different results on different runs?
Because K-Means starts with random initial cluster centers, different starting points can lead to different final clusters.
Click to reveal answer
beginner
What metric does K-Means clustering typically use to assign points to clusters?
K-Means typically uses Euclidean distance to measure how close a data point is to each cluster center.
Click to reveal answer
What does K-Means clustering require you to decide before running the algorithm?
AThe number of clusters (K)
BThe labels of data points
CThe learning rate
DThe number of features
How does K-Means assign a data point to a cluster?
ABy choosing the cluster with the nearest center
BRandomly
CBased on the data point's label
DUsing the maximum distance
What happens to cluster centers after assigning points in K-Means?
AThey are deleted
BThey stay fixed
CThey move to the mean of assigned points
DThey move to the farthest point
Which of these is a common problem with K-Means clustering?
AIt always finds the global best solution
BIt requires labeled data
CIt only works for text data
DResults depend on initial cluster centers
What type of learning is K-Means clustering?
AReinforcement learning
BUnsupervised learning
CSupervised learning
DDeep learning
Explain how the K-Means clustering algorithm works step-by-step.
Describe why choosing the right number of clusters (K) is important in K-Means clustering.