Linked Questions

15 votes
1 answer
33k 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 ...
user avatar
  • 255
5 votes
3 answers
7k 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 ...
user avatar
2 votes
1 answer
7k 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 ...
user avatar
  • 131
2 votes
0 answers
872 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 ...
user avatar
1 vote
1 answer
61 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 ...
user avatar
25 votes
8 answers
28k 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 ...
user avatar
  • 253
56 votes
3 answers
36k 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 ...
user avatar
  • 869
48 votes
2 answers
37k 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 ...
user avatar
  • 5,844
21 votes
4 answers
24k 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? ...
user avatar
28 votes
4 answers
37k 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 ...
user avatar
19 votes
4 answers
36k 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 ...
user avatar
  • 311
28 votes
1 answer
20k 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 ...
user avatar
  • 467
10 votes
3 answers
22k 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 ...
user avatar
  • 3,505
8 votes
2 answers
22k 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 ...
user avatar
  • 474
7 votes
4 answers
10k views

k-means cluster, How to re-calculate centroid when using cosine similarity?

I have a requirement using k-means cluster method with cosine similarity instead of Euclidean distance. for example: ...
user avatar
  • 171

15 30 50 per page