Unsupervised Learning
5 试题
For which of the following tasks might K-means clustering be a suitable algorithm? Select all that apply.
Given historical weather records, predict if tomorrow's weather will be sunny or rainy.
Given many emails, you want to determine if they are Spam or Non-Spam emails.
Given a set of news articles from many different news websites, find out what are the main topics covered.
From the user usage patterns on a website, figure out what different groups of users exist.
Suppose we have three cluster centroids μ1=[12], μ2=[−30] and μ3=[42]. Furthermore, we have a training example x(i)=[−12]. After a cluster assignment step, what will c(i) be?
c(i)=3
c(i)=1
c(i)=2
c(i) is not assigned
K-means is an iterative algorithm, and two of the following steps are repeatedly carried out in its inner-loop. Which two?
The cluster assignment step, where the parameters c(i) are updated.
Move the cluster centroids, where the centroids μk are updated.
Move each cluster centroid μk, by setting it to be equal to the closest training example x(i)
The cluster centroid assignment step, where each cluster centroid μi is assigned (by setting c(i)) to the closest training example x(i).
Suppose you have an unlabeled dataset {x(1),…,x(m)}. You run K-means with 50 different random
initializations, and obtain 50 different clusterings of the
data. What is the recommended way for choosing which one of
these 50 clusterings to use?
Plot the data and the cluster centroids, and pick the clustering that gives the most "coherent" cluster centroids.
Use the elbow method.
Manually examine the clusterings, and pick the best one.
Compute the distortion function J(c(1),…,c(m),μ1,…,μk), and pick the one that minimizes this.
Which of the following statements are true? Select all that apply.
Once an example has been assigned to a particular centroid, it will never be reassigned to another different centroid
K-Means will always give the same results regardless of the initialization of the centroids.
A good way to initialize K-means is to select K (distinct) examples from the training set and set the cluster centroids equal to these selected examples.
On every iteration of K-means, the cost function J(c(1),…,c(m),μ1,…,μk) (the distortion function) should either stay the same or decrease; in particular, it should not increase.
本文探讨了K-means聚类算法的应用场景,包括如何基于用户行为划分用户群组及发现新闻主题等,并深入解析了K-means算法的工作原理,如簇分配步骤和质心更新方法,同时讨论了算法初始化及评估策略。

769

被折叠的 条评论
为什么被折叠?



