algorithm - Can k-means clustering do classification? -


i want know whether k-means clustering algorithm can classification?

if have done simple k-means clustering .

assume have many data , use k-means clusterings, 2 clusters a, b. , centroid calculating method euclidean distance.

cluster @ left side.

cluster b @ right side.

so, if have 1 new data. should do?

  1. run k-means clustering algorithm again, , can cluster new data belong to?

  2. record last centroid , use euclidean distance calculating decide new data belong to?

  3. other method?

the simplest method of course 2., assign each object closest centroid (technically, use sum-of-squares, not euclidean distance; more correct k-means, , saves sqrt computation).

method 1. fragile, k-means may give different solution; in particular if didn't fit data in first place (e.g. high dimensional, clusters of different size, many clusters, ...)

however, following method may more reasonable:

3. train actual classifier.

yes, can use k-means produce initial partitioning, assume k-means partitions reasonable classes (you really should validate @ point though), , continue if data have been user-labeled.

i.e. run k-means, train svm on resulting clusters. use svm classification.

k-nn classification, or assigning each object nearest cluster center (option 1) can seen simple classifiers. latter 1nn classifier, "trained" on cluster centroids only.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -