Machine Learning week8 quiz1

本文探讨了K-means聚类算法的应用场景,如新闻主题发现和用户行为分析等,并解析了算法的工作原理,包括如何通过迭代更新质心位置和分配样本来最小化误差平方和。此外,还讨论了如何选择最佳的聚类结果及K-means的一些关键特性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >



Question 1
1
point

1. Question 1

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 a set of news articles from many different news websites, find out what are the main topics covered.

Given many emails, you want to determine if they are Spam or Non-Spam emails.

From the user usage patterns on a website, figure out what different groups of users exist.

Question 2
1
point

2. Question 2

Suppose we have three cluster centroids μ1=[12]μ2=[30] and μ3=[42]. Furthermore, we have a training example x(i)=[21]. After a cluster assignment step, what will c(i) be?

c(i)=1

c(i)=2

c(i) is not assigned

c(i)=3

Question 3
1
point

3. Question 3

K-means is an iterative algorithm, and two of the following steps are repeatedly carried out in its inner-loop. Which two?

Move the cluster centroids, where the centroids μk are updated.

The cluster assignment step, where the parameters c(i) are updated.

Randomly initialize the cluster centroids.

Test on the cross-validation set.

Question 4
1
point

4. Question 4

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?

Use the elbow method.

Plot the data and the cluster centroids, and pick the clustering that gives the most "coherent" cluster centroids.

Compute the distortion function J(c(1),,c(m),μ1,,μk), and pick the one that minimizes this.

Manually examine the clusterings, and pick the best one.

Question 5
1
point

5. Question 5

Which of the following statements are true? Select all that apply.

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.

Once an example has been assigned to a particular centroid, it will never be reassigned to another different centroid

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.

K-Means will always give the same results regardless of the initialization of the centroids.

Question 1
1
point

1. Question 1

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 a set of news articles from many different news websites, find out what are the main topics covered.

Given many emails, you want to determine if they are Spam or Non-Spam emails.

From the user usage patterns on a website, figure out what different groups of users exist.

Question 2
1
point

2. Question 2

Suppose we have three cluster centroids μ1=[12]μ2=[30] and μ3=[42]. Furthermore, we have a training example x(i)=[21]. After a cluster assignment step, what will c(i) be?

c(i)=1

c(i)=2

c(i) is not assigned

c(i)=3

Question 3
1
point

3. Question 3

K-means is an iterative algorithm, and two of the following steps are repeatedly carried out in its inner-loop. Which two?

Move the cluster centroids, where the centroids μk are updated.

The cluster assignment step, where the parameters c(i) are updated.

Randomly initialize the cluster centroids.

Test on the cross-validation set.

Question 4
1
point

4. Question 4

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?

Use the elbow method.

Plot the data and the cluster centroids, and pick the clustering that gives the most "coherent" cluster centroids.

Compute the distortion function J(c(1),,c(m),μ1,,μk), and pick the one that minimizes this.

Manually examine the clusterings, and pick the best one.

Question 5
1
point

5. Question 5

Which of the following statements are true? Select all that apply.

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.

Once an example has been assigned to a particular centroid, it will never be reassigned to another different centroid

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.

K-Means will always give the same results regardless of the initialization of the centroids.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值