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
1,050 questions
2
votes
2
answers
2k
views
Image Clustering with K-means - Postprocessing
I did some clustering on an image (each pixel is an observation that has 5 variables associated with it), I get pretty detailed results but they are a little bit noisey... I think. I used K-means. ...
1
vote
2
answers
191
views
Seeking for a fast non parametic clustering algorithm
I'm looking for a fast clustering method to cluster a large kind of datas to a unknown count of clusters.
I know about the PAM-Algorithm. But it's only efficient for low datasets.
Is there a ...
2
votes
3
answers
722
views
Metric and Clustering Method
I need some suggestions regarding what kind of metric and clustering analysis I should use. I read a lot of posts but didn't get any hints about this type of data.
I have a 3000*5000 matrix, where ...
6
votes
1
answer
9k
views
K-means Mahalanobis vs Euclidean distance
I currently am trying to cluster "types" of changes on bitemporal multispectral satellite images.
I applied a thing called a mad transform to both images, 5000 x 5000 pixels x 5 bands.
Each band is a ...
1
vote
1
answer
171
views
Need some help clarifying my procedure using kmeans on multiple batches of data
I am working on an online image feature recognition program(BOW histograms) that gets objects in a live cam and extracts the SIFT features. After getting a bunch of pictures, I get the kmeans of the ...
2
votes
1
answer
668
views
Market / Customer Segmentation - Merging two different segmentations
I have a database where each observation is a person. They were questioned on their attitude towards the consumption of X category of product. I have being using K-means to segment this data.
I have ...
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 (...
3
votes
2
answers
574
views
Incremental hierarchical clustering
I have an online k-means algorithm following this scheme:
...
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 ...
12
votes
1
answer
14k
views
Optimal number of components in a Gaussian mixture
So, getting an "idea" of the optimal number of clusters in k-means is well documented. I found an article on doing this in gaussian mixtures, but not sure I am convinced by it, don't ...
6
votes
2
answers
5k
views
Fuzzy K-means - Cluster Sizes
I'm trying to do fuzzy k-means clustering on a dataset using the cmeans function (R) . The problem Im facing is that the sizes of clusters are not as I would like them to be. This is done by ...
3
votes
1
answer
341
views
K - means cluster always landing right on top of whole dataset mean
I have a so so sized data set - 30 000 observations. I would like to run K-means on them but to restrict the center(mean) of the data. This is, I would like to push the clusters away from this mean. ...
4
votes
2
answers
2k
views
Can you use discriminant analysis to classify new observations into categories generated by a previous $k$-means clustering?
After doing k-means clustering on a set of observations, I would like to construct a discriminant function so as to classify new observations into the categories I found after k-means. Is this at all ...
0
votes
2
answers
2k
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 ...
2
votes
0
answers
10k
views
Distance threshold for clustering
Usually online clustering methods (based on kmeans or not) define a distance threshold value. If a new data-point $x$ is far enough from the nearest center $c$ (i.e. the distance from $x$ to $c$ is ...
89
votes
4
answers
198k
views
How to produce a pretty plot of the results of k-means cluster analysis?
I'm using R to do K-means clustering. I'm using 14 variables to run K-means
What is a pretty way to plot the results of K-means?
Are there any existing implementations?
Does having 14 variables ...
4
votes
1
answer
2k
views
Ecological mixed data cluster analysis: Transformations required? Use K-means or hierarchical methods?
I am trying to identify habitat types from 85 plots. I intend to do a cluster analysis to identify habitat types, and hope to fit additional plots into the identified clusters.
(For context, I took ...
13
votes
4
answers
28k
views
Initializing K-means centers by the means of random subsamples of the dataset?
If I have a certain dataset, how smart would it be to initialize cluster centers using means of random samples of that dataset?
For example, suppose I want ...
4
votes
2
answers
32k
views
Quantitative evaluation metric of kmeans clustering results
I'm using k-means to cluster sentences according to the part-of-speech tags of the words in a sentence, and I have a nice, easy to understand visualization of the result, but I'm struggling to find a ...
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 ...
5
votes
2
answers
398
views
Problem of "clustering" into most similar groups
I do not think that the following problem can be solved with k-means clustering. I am not sure though. Okay, let me describe the problem. I need to find a way or an algorithm that groups members of a ...
6
votes
1
answer
7k
views
How to cluster LDA/LSI topics generated by gensim?
I'm an enthusiastic single developer working on a small start-up idea. I reduced a corpus of mine to an LSA/LDA vector space using gensim. Now I have a bunch of ...
3
votes
1
answer
1k
views
Maximum entropy inference for k-means clustering
I am taking a course on Maximum Entropy Inference (MEI), where its application to k-Means was discussed. I am confused about the problem setting.
As far as I understand, our goal is to find ...
40
votes
5
answers
64k
views
Clustering a dataset with both discrete and continuous variables
I have a dataset X which has 10 dimensions, 4 of which are discrete values.
In fact, those 4 discrete variables are ordinal, i.e. a higher value implies a higher/better semantic.
2 of these discrete ...
2
votes
2
answers
3k
views
Predicting SSE in k-means clustering
Given any number of clusters, is it possible to estimate the Sum of Squares Error (SSE) for the Clusters after adding noise to the clustering?
The type of noise generated will be supplied as a ...
7
votes
6
answers
4k
views
How to do time series ( longitudinal) clustering based entirely on Shape of the curves?
I have a longitudinal (panel) dataset for investment growth for 120 countries covering the time from 1960-2008. Essentially it's viewed as 120 time series.
What I am interested in is to group ...
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 ...
1
vote
1
answer
182
views
How to identify quickly an aproximative number of clusters from a relatively small dataset
How is it possible to identify quickly (without doing many tests) an approximative number of clusters from a dataset which is not vary large, even if this value is not the correct number of clusters, ...
2
votes
1
answer
218
views
Statistics or probabilities associated to each cluster in order to predict if a future datapoint is member of its nearest center
Suppose we have a classical k-means where iteratively each datapoint is assigned to its nearest center.
After a certain time, suppose that we change the dataset by another similar dataset containing ...
7
votes
3
answers
976
views
Online clustering
I'm trying to build a K-means clustering system with 'online learing', that is, there are existing K clusters and data points in them, and periodically there is a new data point that is sent to an ...
5
votes
1
answer
812
views
How do I weight words in title, body text, and links differently in document clustering?
I'm currently trying to play around with NLTK and scikits-learn for text clustering news articles.
How do I extend the models to add the scaling of features from a document (I'm doing some ...
59
votes
11
answers
99k
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. ...
2
votes
1
answer
136
views
Need help in automatically computing optimal hyper-parameters for a clustering algorithm
I have an algorithm that take as input some data (that are continuously arriving) and 3 or 4 parameter values that should be specified by the user. At the and of execution (or periodically during ...
69
votes
2
answers
100k
views
Are mean normalization and feature scaling needed for k-means clustering?
What are the best (recommended) pre-processing steps before performing k-means?
7
votes
2
answers
2k
views
Simulated annealing and k-means
One of my problems https://stackoverflow.com/questions/7783933/clustering-data-outputs-irregular-plot-graph suffers from the curse of dimensionality, which also makes it infeasible for exhaustive ...
2
votes
1
answer
3k
views
Problem with k-means used to initialize HMM
I have a sequence of two possible observations ($A$, $B$) and want to train an HMM with $h$ states, namely $\lambda_h$, to predict the probability of the next observation using the Baum-Welch ...
1
vote
0
answers
115
views
Bayesian classifier and discovery of new classifications
I've written Naive Bayesian classifiers before, they work wonderfully. But I'd like a classifier which will learn like a Bayesian classifier and identify new classifications when a new cluster emerges....
1
vote
1
answer
1k
views
How to implement k-means cluster analysis algorithm correctly?
I am trying to implement the K-mean analysis with the Standard algorithm.
My implementation seems to work, but I noticed some strange behavior. If the k is close to half of the length of the list to ...
5
votes
1
answer
8k
views
How to derive a k-means objective function in matrix form?
If $X = \{ x_1,\cdots x_n\}$ is a set of feature vectors, then the k-means algorithm tries to minimize the objective function $O = \sum_{i=1}^{k}\sum_{x \in G_i}||x -\mu_i ||^2$ in order to cluster $n$...
14
votes
3
answers
18k
views
Clustering probability distributions - methods & metrics?
I have some data points, each containing 5 vectors of agglomerated discrete results, each vector's results generated by a different distribution, (the specific kind of which I am not sure, my best ...
6
votes
1
answer
4k
views
X-mean algorithm BIC calculation question
I'm having trouble understanding some of the formulas in this paper related to BIC calculation (Dan Pelleg and Andrew Moore, X-means: Extending K-means with Efficient Estimation of the Number of ...
11
votes
4
answers
3k
views
Are there cases where there is no optimal k in k-means?
This has been inside my mind for at least a few hours. I was trying to find an optimal k for the output from the k-means algorithm (with a cosine similarity metric) so I ended up plotting the ...
1
vote
1
answer
2k
views
Assigning class to the cases after K means cluster analysis (SPSS)
I have carried out PCA and then clustered the 6 resultant components using K-means clustering technique using SPSS. Normally SPSS adds a class variable for each case indicating its assigned group.
...
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 ...
92
votes
6
answers
83k
views
How to tell if data is "clustered" enough for clustering algorithms to produce meaningful results?
How would you know if your (high dimensional) data exhibits enough clustering so that results from kmeans or other clustering algorithm is actually meaningful?
For k-means algorithm in particular, ...
9
votes
2
answers
2k
views
Memory requirements of $k$-means clustering
Can anyone tell me the factors that affect the memory requirements of $k$-means clustering with a bit of explanation?
11
votes
1
answer
17k
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-...
2
votes
2
answers
3k
views
Automating determination of number of clusters from a kmeans cluster analysis
I use kmeans for clustering a set of data. However, I have to specify the number of clusters. The problem is that sometimes I need 2 and other times I need 3 clusters.
Is there a clustering algorithm ...
10
votes
3
answers
3k
views
Cycling in k-means algorithm
According to wiki the most widely used convergence criterion is "assigment hasn't changed". I was wondering whether cycling can occur if we use such convergence criterion? I'd be pleased if anyone ...
33
votes
5
answers
26k
views
Clustering procedure where each cluster has an equal number of points?
I have some points $X=\{x_1,...,x_n\}$ in $R^p$, and I want to cluster the points so that:
Each cluster contains an equal number of elements of $X$. (Assume that the number of clusters divides $n$.)
...