Questions tagged [k-means]

k-means is a method to partition data into clusters by finding a specified number of means, k, s.t. when data are assigned to clusters w/ the nearest mean, the w/i cluster sum of squares is minimized

Filter by
Sorted by
Tagged with
4 votes
1 answer
1k views

Is there anything wrong with performing EM clustering on PCA output?

I am trying to separate my dataset into meaningful clusters. I have tried k-means, hierarchical and EM clustering (fitting a gaussian mixture model using EM algorithm, using the EMCluster R package) ...
fns's user avatar
  • 41
4 votes
2 answers
6k views

Find the optimal number of clusters in large dataset using R

I've a got a data which I did a PCA on. I want to do a kmeans on the individuals coordinates on the 5 first principal components. Therefore I have a 200000 x 5 matrix of the coordinates. I'm looking ...
Taoufiq Mouhcine's user avatar
4 votes
1 answer
1k views

Incorporating new words in tfidf feature-vector for online clustering

I am building an Online news clustering system using Lucene and Mahout libraries in java. I intend to use vector space model and tfidf weights for Kmeans(or fuzzy/streamKmeans). My plan is : Cluster ...
aman2357's user avatar
4 votes
2 answers
194 views

Controling segmentation process in order to get usable segments

My aim is to create segments based on survey data. This in it self is quite straight forward: I use PCA to extract information from the survey answers, and then ...
Figaro's user avatar
  • 1,152
4 votes
1 answer
2k views

K-Medoids swapping inside clusters

I'm a bit confused with concept of K-medoids. It seems that original algorithm (PAM) describes that swap step should be performed by swaping only one of the medoids with one non-medoid point from ...
Kobe-Wan Kenobi's user avatar
4 votes
1 answer
2k views

k-means triangle inequality

This page explains very good how k-means works: http://mnemstudio.org/clustering-k-means-example-1.htm Somewhere I heard that there is some algorithms, which use triangle inequality to speed up the ...
user1930254's user avatar
4 votes
2 answers
81 views

Is there an efficient way to discriminate space based on K-Means results?

Suppose we done K-Means and got K centroids of clusters and we want to tag new points based on those K centroids. UPDATE: These K centroids are given to me, so I can't go for another clustering ...
Mehraban's user avatar
  • 593
4 votes
1 answer
3k views

How to run K-means clustering on data points of varying dimensionality?

I'm trying to aggregate $T$ local image descriptors (i.e. histograms) into a vector, namely, the Fisher Vector as described in this paper by H. Jégou et al., Aggregating local image descriptors into ...
marcos's user avatar
  • 83
4 votes
1 answer
3k views

clustering groups but with multiple observations per group

I'd have 10 groups and hundreds of observations per group. In this toy example I only have 3 groups with 20 observations each. I am looking to see if groups are similar so I'm using kmeans to ...
user3022875's user avatar
4 votes
1 answer
2k views

How to estimate most important dimensions of the clusters after performing k-means?

I need to cluster customers of retail shops based on the products that they purchased. Therefore, I need to obtain, as results, both the customers belonging to each cluster and in each cluster the ...
Nko's user avatar
  • 41
4 votes
1 answer
2k views

what's the implementation of SciKit-Learn K-Means for empty clusters?

SciKit-Learn's K-Means doesn't discard empty clusters (code of particular function here). Instead, it looks for the pattern that is furthest away from its assigned centroid (assigned cluster but I ...
diogoaos's user avatar
  • 141
4 votes
1 answer
414 views

Cluster analysis without knowing the structure of the data set

I’m working on a task regarding cluster analysis for about half a year now, but since the fields of pattern recognition and cluster analysis are quite complex ones, I would call myself a beginner in ...
Leonard's user avatar
  • 41
4 votes
2 answers
2k views

K-means clustering feature selection

I have a set of English and foreign language documents that I would to perform k-means clustering on to find document groups by topic. These documents are concatenated social media comments for ...
Paul's user avatar
  • 141
4 votes
1 answer
717 views

Clustering into teams of fixed size

There is a particular team-based video game that exposes a ladder of individual ratings for each player that looks like this (player, rating, wins, losses): A, 2000, 35, 12 B, 1900, 41, 19 C, 1800, ...
Grozz's user avatar
  • 41
4 votes
0 answers
679 views

Can clustering with Gaussian mixture models be done based on cosine similarity?

Apologies if this has already been answered; I found some similar posts (here and here) but don't feel they answered the specific question I have. Please feel free to correct any misunderstandings in ...
phamilton's user avatar
4 votes
2 answers
7k views

Missing data in k-means cluster model

I'm working on clustering email addresses using K-means based on their value to and engagement with the company (metrics such as % of emails opened, # of web browsing sessions, etc). I would like to ...
ERB3's user avatar
  • 41
4 votes
0 answers
2k views

Pearson's Correlation Coefficient as a clustering criterion: why should it be close to -1?

Let's say we have a dataset $x = (x_1, x_2, ..., x_n)$ where each data point is assigned to one of $m$ clusters. Let $D = \{d_{ij}\}$ be the $n\times n$ distance matrix where $d_{ij} = d(x_1, x_j)$. ...
Krithika Raghavendran's user avatar
4 votes
0 answers
1k views

Why does Kernel K-means work better than spectral clustering in this case?

I want to cluster a dataset using spectral clustering. Assuming $X$ is $d \times n$ data matrix as $n$ is the number of data samples. I construct a directed Adjacency matrix $W, n \times n$ in which ...
Bob's user avatar
  • 439
4 votes
0 answers
12k views

K-Means Clustering with Dummy Variables

I want to use k-means to cluster my data. I have broken one column into 4 dummy variables and I have normalized all of the data to mean=0 and sd=1. Will k-means work with these dummy variables? I ...
Adam12344's user avatar
  • 527
4 votes
0 answers
2k views

Checking the assumptions of K-means clustering

I want to do a k-means clustering on a dataset containing 22 numerical variables between 0 and 100 and 75 observations using R. I read this post How to understand the drawbacks of K-means on k-means ...
Hamideh's user avatar
  • 217
4 votes
0 answers
29k views

k-means clustering why sum of squared errors (why k-medoids not)?

K-means clustering uses the sum of squared errors (SSE) $E = \sum\limits_{i=1}^k \sum\limits_{p \in C_i} (p-m_i)^2$ (with k clusters, C the set of objects in a cluster, m the center point of a ...
dominic's user avatar
  • 41
3 votes
5 answers
2k views

An algorithm similar to (or based on) K-means that do not require the 'k' number of clusters

These days I'm using a lot (and discovering) nice ways to use k-means' clustering. For example, clustering word embeddings (word2vec vectors) to find synonyms or clustering doc vectors (doc2vec) to ...
denisb411's user avatar
  • 153
3 votes
2 answers
7k views

Feature / attribute selection for k-means or other clustering

It seems to me that in literature it is assumed that one knows which features / attributes to choose to characterize an item in clustering. If I have a database with items which have many attributes, ...
user2653422's user avatar
3 votes
2 answers
4k views

What is the mathematical definition of the 'Elbow Method'?

In K-means algorithm, it is recommender to pick the optimal K, according to the Elbow Method. However all the tutorials explain the elbow method in these 4 steps: Run K-means for a range of K's ...
Dimgold's user avatar
  • 328
3 votes
4 answers
11k views

Determine the number of clusters for K-means automatically

Since a couple of days I research for a method to determine the number of clusters for K-means automatically, I found elbow method but I can not till now understand its principle. Is there any ...
lotfishtaine's user avatar
3 votes
2 answers
5k views

Clustering not producing even clusters

I'm using k-means clustering to processes running on machines. Dataset sample : machine name, process m1,java m2,tomcat m1,word m3,excel Build a matrix of ...
blue-sky's user avatar
  • 637
3 votes
2 answers
2k views

Clustering with shape prior

EDIT STARTS After seeing the comments and answers, I believe I started in a wrong direction. I have a set of rectangles, which I want to cluster as shown below. . The approach I took was to consider ...
rivu's user avatar
  • 424
3 votes
2 answers
1k views

Using clustering for unsupervised classification (visualizing k-means cluster centers)

I know that the cluster centroid is the middle of a cluster. It's a vector containing one number for each variable, where each number is the mean of a variable for the observations in that cluster. I ...
Kuka's user avatar
  • 43
3 votes
2 answers
2k views

What if k-means starts in a local minimum?

I have to find 10 clusters of 100 samples with dimension 100. I have access to two k-means implementations. Both of them initialize the means with 10 randomly picked samples. When I run these ...
blubb's user avatar
  • 2,630
3 votes
2 answers
251 views

Termination conditions for K-means and their interconnection

As far as I know, there are two termination criteria for K-means clustering algorithm: assignments of data points do not change centroids do not change I wonder if there is any kind of relation ...
Artem Tartakovskiy's user avatar
3 votes
1 answer
2k views

Assign new data to a cluster (using Gower distance and PAM algorithm)

I have a dataset which has mixed data types and hence I used Gower dissimilarity matrix as input to cluster the data using Partitioning Around Medoids (PAM) algorithm. I wanted to know if there is any ...
ANP's user avatar
  • 63
3 votes
4 answers
26k views

K-means: Does it make sense to remove the outliers after clustering the datasets?

The requirements of the project is to cluster the dataset (using k-means) and then remove the outliers (using MAD) from each of the cluster. However, I don't feel that it make sense to do that. I ...
stevenferrer's user avatar
3 votes
2 answers
9k views

trouble in understanding outliers' influence on K-means

When outliers are present, the resulting cluster centroids may not be as representative as they otherwise would be and thus, the SSE will be higher as well. However, I don't understand this sentence. ...
Mark's user avatar
  • 151
3 votes
2 answers
13k views

Cross-validation for k-means clustering in R

I have a dataset of two columns (we can call them x and y). I understand that for cross-validation I need to split my data into k partitions, and for that the general consensus is that I use ...
ehzed's user avatar
  • 31
3 votes
1 answer
2k views

When would I use EM instead of k-means?

When would I want to assign cluster probabilities to patterns instead of hard assignments to clusters? Can someone elaborate?
Dahlai's user avatar
  • 307
3 votes
2 answers
1k views

k-means with several repetitions

In matlab and python, when running k-means, it is possible to set several repetitions (with random init) so that all of them in the end are combined to have stable global result? I am wondering how ...
fractile's user avatar
  • 911
3 votes
1 answer
2k views

Acceptable SSE (sum of squared errors) for K-means

I am developing a k-means clustering algorithm, and I have obtained the ideal number of clusters based on the elbow method. However, despite the fact that the error diminishes a lot with the number of ...
Johanna's user avatar
  • 583
3 votes
2 answers
2k views

How to interpret the meaning of KMeans clusters

Using the elbow method, I determine the correct number of clusters for the KMeans function. Having done that, I still have no idea how to interpret the clusters in a meaningful way. If someone asked ...
Stephen O'Brien's user avatar
3 votes
1 answer
2k views

Should one randomize the order in the data, for a k-means cluster analysis?

I have read somewhere that it is better to randomize the order of your data several times, and perform each time the corresponding ulterior kmeans analysis, to be sure that your clustering results are ...
Faustino's user avatar
  • 145
3 votes
1 answer
5k views

how to handle sparse data problem in unsupervised learning .i'm going to use k means on data set

how to handle sparse data problem in unsupervised learning .i'm going to use k-means on the dataset. I have 200 variables, nearly in each column have 70% zeros. how can I handle without discarding any ...
Newbie's user avatar
  • 141
3 votes
2 answers
9k views

X-means algorithm and BIC

I want to simulate X-means algorithm based on [1] in MATLAB. I have some questions about this algorithm. X-means Algorithm Steps: (1) Initialize K = Kmin. (2) Run K-means algorithm. (3) FOR k = 1,...
Khatereh's user avatar
3 votes
1 answer
9k views

Chosing optimal k and optimal distance-metric for k-means [duplicate]

I have a data-set with roughly 20-dimensions and millions of points which I want to cluster. The goal is to find a set of clusters which: Are as distinct as possible from each other (minimum ...
arielf's user avatar
  • 1,148
3 votes
1 answer
2k views

K-means clustering for usage profiling

I am trying to use k-means clustering to profile mobile device usage behaviour for IT users. My data consists of different system and user level variable/readings like number of calls/sms, cpu/memory ...
Khurram Majeed's user avatar
3 votes
1 answer
5k views

Convergence of K-means

I have a clustering algorithm which works iteratively like K-means, but there are some constraints on cluster sizes with lower and upper thresholds. Do you know any convergence proofs of K-means in ...
remo's user avatar
  • 267
3 votes
2 answers
3k views

Hybrid (K-means + Hierarchical ) clustering

I have a huge dataset (50,000 2000-dimensional sparse feature vectors). I want to cluster them in to k (unknown)clusters. As hierarchical clustering is very expensive in terms of time complexity (...
Maggie's user avatar
  • 209
3 votes
2 answers
571 views

Incremental hierarchical clustering

I have an online k-means algorithm following this scheme: ...
shn's user avatar
  • 2,959
3 votes
2 answers
325 views

SSE for K-means and K-medoids

I am trying to understand given same data set and same K - will the SSE of K means be higher than K Medoids or not. both try to minimize the SSE and K-medoids is more robust to outliers - does it mean ...
Hawk's user avatar
  • 31
3 votes
1 answer
2k views

Relation between pairwise distance sum and sum of distance to mean (gap statistic)

I'm trying to understand the gap statistic used for optimal choice of $k$ in k-means clustering. I'm trying to understand part of the explanation which includes this equality: $D_k=\sum_{ij}\Vert x_i-...
Daniel's user avatar
  • 177
3 votes
1 answer
3k views

How can I order kmeans clusters?

I have a kmeans cluster object and I would like to order the clusters. Not the observations within the clusters, rather the clusters in order of each other. Is there a way of doing this? I found ...
Doug Fir's user avatar
  • 1,568
3 votes
1 answer
1k views

Which methods can help us to understand clustering model is good or bad?

In some clustering algorithm, ex: K-Means cluster, it is very sensitive with outliers, so we need to remove outliers before aplly ...
voxter's user avatar
  • 150

1
3 4
5
6 7
21