Linked Questions

16 votes
1 answer
42k views

Cosine Distance as Similarity Measure in KMeans [duplicate]

I am currently solving a problem where I have to use Cosine distance as the similarity measure for k-means clustering. However, the standard k-means clustering package (from Sklearn package) uses ...
MSalty's user avatar
  • 275
6 votes
3 answers
10k views

Is there a situation when one would use L1 norm over L2 norm in k-means algorithm? [duplicate]

Is there a situation when one would use L1 norm over L2 norm in k-means algorithm? In most of the articles online, k-means all deal with l2-norm. L1 norm does not seem to be useful because it is not ...
user10024395's user avatar
2 votes
1 answer
8k views

Why is it bad to use Pearson distance in K-means clustering? [duplicate]

I have implemented this algorithm in MATLAB and when I produce plots I notice that using Euclidean distance, I usually get presented with a clear pattern (sum of squares decreases with the number of ...
blurub's user avatar
  • 131
2 votes
0 answers
877 views

Is pairwise distance matrix useful to k-means? [duplicate]

The k-means implemented in scikit-learn precomputes distances but I don't how these distances are used. In its standard version, k-means is known to compute only the distances between the points and ...
pedro colombino's user avatar
1 vote
1 answer
352 views

is k-means generalizable at any distance? [duplicate]

The classical version of k-means uses the Euclidean distance in the first step, and the arithmetic mean (the value center) in the second step. Is k-means generalizable to other distances and other ...
pedro colombino's user avatar
31 votes
8 answers
36k 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 ...
mouse's user avatar
  • 313
63 votes
3 answers
45k views

How to select a clustering method? How to validate a cluster solution (to warrant the method choice)?

One of the biggest issue with cluster analysis is that we may happen to have to derive different conclusion when base on different clustering methods used (including different linkage methods in ...
Learner's user avatar
  • 949
55 votes
2 answers
44k views

Hierarchical clustering with mixed type data - what distance/similarity to use?

In my dataset we have both continuous and naturally discrete variables. I want to know whether we can do hierarchical clustering using both type of variables. And if yes, what distance measure is ...
Beta's user avatar
  • 6,466
35 votes
4 answers
50k views

Clustering a correlation matrix

I have a correlation matrix which states how every item is correlated to the other item. Hence for a N items, I already have a N*N correlation matrix. Using this correlation matrix how do I cluster ...
Abhishek093's user avatar
21 votes
4 answers
25k views

How to understand the drawbacks of Hierarchical Clustering?

Can someone explain the pros and cons of Hierarchical Clustering? Does Hierarchical Clustering have the same drawbacks as K means? What are the advantages of Hierarchical Clustering over K means? ...
GeorgeOfTheRF's user avatar
22 votes
4 answers
39k 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 ...
Eugenio's user avatar
  • 341
30 votes
1 answer
25k views

Converting similarity matrix to (euclidean) distance matrix

In Random forest algorithm, Breiman (author) constructs similarity matrix as follows: Send all learning examples down each tree in the forest If two examples land in the same leaf increment ...
Uros K's user avatar
  • 487
11 votes
3 answers
25k views

K-means on cosine similarities vs. Euclidean distance (LSA)

I am using latent semantic analysis to represent a corpus of documents in lower dimensional space. I want to cluster these documents into two groups using k-means. Several years ago, I did this using ...
Jeff's user avatar
  • 4,027
10 votes
2 answers
27k views

K-means: Why minimizing WCSS is maximizing Distance between clusters?

From a conceptual and algorithmic standpoint, I understand how K-means works. However, from a mathematical standpoint, I don't understand why minimizing the WCSS (within-cluster sums of squares) will ...
slaw's user avatar
  • 504
11 votes
3 answers
9k 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 ...
ScoobySnacks's user avatar

15 30 50 per page