Linked Questions

56
votes
11answers
84k views

How to decide on the correct number of clusters?

We find the cluster centers and assign points to k different cluster bins in k-means clustering which is a very well known algorithm and is found almost in every machine learning package on the net. ...
81
votes
6answers
126k views

Why does k-means clustering algorithm use only Euclidean distance metric?

Is there a specific purpose in terms of efficiency or functionality why the k-means algorithm does not use for example cosine (dis)similarity as a distance metric, but can only use the Euclidean norm? ...
24
votes
8answers
25k views

Perform K-means (or its close kin) clustering with only a distance matrix, not points-by-features data

I want to perform K-means clustering on objects I have, but the objects aren't described as points in space, i.e. by objects x features dataset. However, I am able ...
19
votes
4answers
34k views

k-means implementation with custom distance matrix in input

Can anyone point me out a k-means implementation (it would be better if in matlab) that can take the distance matrix in input? The standard matlab implementation needs the observation matrix in input ...
17
votes
3answers
30k views

Choosing optimal K for KNN

I performed a 5-fold CV to select the optimal K for KNN. And it seems like the bigger K gets, the smaller the error... Sorry I didn't have a legend, but the different colors represent different ...
11
votes
1answer
16k views

Elbow criteria to determine number of cluster

It is mentioned here that one of the methods to determine the optimal number of clusters in a data-set is the "elbow method". Here the percentage of variance is calculated as the ratio of the between-...
20
votes
1answer
19k views

How to define number of clusters in K-means clustering?

Is there any way to determine the optimal cluster number or should I just try different values and check the error rates to decide on the best value?
9
votes
3answers
6k views

Using k-means with other metrics

So I realize this has been asked before: e.g. What are the use cases related to cluster analysis of different distance metrics? but I've found the answers somewhat contradictory to what is suggested ...
2
votes
2answers
5k views

How to determine optimal number of clusters?

For a multilabel dataset, i would like to find the number of clusters involved in it. The below example gives more details about the problem: ...
0
votes
2answers
1k views

Distance function for categories in K-means

How to define a distance function when euclidean distance doesn't apply? For instance, say I have some data involves nationality. I'll probably assign a number to each nation, but for nations that ...
-1
votes
1answer
2k views

Determining number of clusters K-means [duplicate]

I would like to automatically determine the number of clusters for K-means. I have read that elbow method could be used for that. The thing that confuses me is - I have to rerun algorithm while ...
1
vote
1answer
25 views

How To Determine Number Of Clusters In T-SNE And Best Clustering Algorithm?

I used TSNE method to cluster my DataSet. ...