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
272 questions with no upvoted or accepted answers
1
vote
1
answer
62
views
What is the technique to measure the performance of the methods clustering?
Given m, p and t non-zero natural numbers:
m is the number of clustering methods,
p is the number of internal measures for cluster validation (i.e halkidi, sd, calinski_harabaz, davies_bouldin...),
t ...
1
vote
0
answers
107
views
Graph clustering for balanced sum of absolute deviations within each cluster (same sum of intracluster distances)
I'm given a set of points and a distance matrix. With these I'm trying to develop an algorithm similar to k-means that tries to minimize the sum of distances from each cluster datapoint to it's center ...
1
vote
0
answers
25
views
k-means and (re?) standardisation of a sub-set
I have data which is customer purchases of items in each of three months:
I have summed the data over the three months for each customer;
calculated the proportion of purchases that each item ...
1
vote
1
answer
1k
views
How to inform the space and time complexity of K-means, SOM and Hierachical clustering
In the paper I am writing, one of the reviewers asked for an
"a simple computational complexity analysis or time computational demands of their method"
My question is : Can I simply report the ...
1
vote
0
answers
915
views
Grouping similar time series (clustering, cointegration)
I have a number of time series' that I am effectively trying to understand which are similar and which can be grouped together. I have some idea of what should be grouped with each other but I am also ...
1
vote
0
answers
66
views
Why using L-method with CH and SIL for number of cluster selection?
In this paper, the author uses CH (Caliński–Harabasz index) and SIL (Silhouette index) methods to decide the number of clusters. However, instead of selecting the highest values, it applies a L-...
1
vote
0
answers
29
views
Why and how does the final solution provided by the k-means algorithm depend on the initial approximation?
Apparently, the final solution provided by the "standard" k-means algorithm depends on the initial approximation of the solution. Why exactly is that? What's the intuition behind it? How does the ...
1
vote
0
answers
128
views
How to compute tf-idf for sequential k means?
I am trying to run the sequential K means algorithm as described here on a corpus using tf-idf as a vectorized representation of my documents. I do this because I don't have access to all of my ...
1
vote
0
answers
138
views
Analysis of k-means clustering in r
I have a group of 144 people. I have 3 categorical observations and each of them is described by three variables. After performing a k-means on 3 clusters in r I see that one of the groups, "overt" ...
1
vote
0
answers
2k
views
Correct calculation of BIC (Bayesian Information Criterion) to determine K for K-Means
I am trying to calculate BIC in python. In python, there is no inbuilt library for computing BIC. I referenced the following link to compute variance and BIC further:- Using BIC to estimate the number ...
1
vote
0
answers
36
views
What is a "sample" and what is a "variable" in those two k-means clustering tasks?
I am confused about what is a "sample" and what is a "variable" in a k-means model. Let's take a gene expression dataset which includes measurements from 1000 genes for 100 patients. When we are ...
1
vote
0
answers
1k
views
Standardizing Percentages and raw data
Apologies for what looks like a easy question but i'm a doing a geodemogrpahic classification and i'm about to run my cluster analysis. Most of my data is in percentages (ie %black,white,asian etc) ...
1
vote
0
answers
2k
views
Kmeans applied to positively skewed variables
The situation I'm facing is relative to a dataset of customers where I'm trying to aggregate 7 clusters of them leveraging on variables related to the type of financial product utilized with a bank.
...
1
vote
1
answer
135
views
Is there a way to accelerate expectation maximization?
There is a way to run a faster $k$-means by using Elkan's method, which uses the triangle inequality to avoid some calculations.
I am trying to think of a way you could do a similar sort of thing for ...
1
vote
0
answers
365
views
Creation and validation of cluster for Bag of words
I recently came across a problem where I have been given a dataset of Bag of words, the description of the dataset is given in the readme file.
What I have been trying to do is create clusters of ...
1
vote
0
answers
1k
views
I did Kmeans with Matlab on my 3D data, the results are differnet from original 3D plot? Why
I have done Kmeans clustering on my data based on three main features. The main scatter plot is as below:
But when Kmeans clusters the data it seems that a part of data points are being flattened. I ...
1
vote
1
answer
554
views
Using Standardized Data or Normal Data With Outliers Excluded
I'm currently working with a large multivariate data set where I plan to use K-Means to try to find any associations in the data.
I'm not particularly well-versed when it comes to statistics, though ...
1
vote
2
answers
487
views
How to find the driving individuals of different k means clusters
My data of 4000 gene expression values across 159 different cells is formatted as so:
...
1
vote
1
answer
46
views
K mean clustering
I have coordinates data set (X.Y) with an additional attribute "Z". I want to cluster the data into 5 clusters based on X and Y but I want to add some constrains on how much the sum of "Z" can be at ...
1
vote
0
answers
35
views
Identify Phrases Not in Training Set (Unsupervised)
I'm trying to train an unsupervised machine learning algorithm to learn a vocabulary and if it is given a word, it can predict how close that word is to what it already knows. Only issue is my ...
1
vote
0
answers
3k
views
Cosine similarity and normalization
When I normalize a data set and compute the cosine similarity between the rows, the cosine similarity differs from the one without any normalization.
Say there are 4 2D vectors: (1, 1), (2, 2), (1, 2)...
1
vote
0
answers
446
views
Using randomforest to predict clusters made by kmeans, IMDB 5000 Kaggle dataset
I have made 4 clusters of movies based on imdb score, number of votes and gross profit. These are nice interpretable clusters with a BSS/TSS of 65%.
Now I would like to use randomforest to predict in ...
1
vote
0
answers
418
views
Is Latent Semantic Analysis a clustering algorithm?
The input of LSA is a term frequency matrix of a set of documents. What's the output? If I want to cluster a bunch of news into different clusters, can I use LSA? If not, what's the major uses of LSA?
...
1
vote
0
answers
112
views
Clustering algorithm with guarantees
I am looking for an algorithm that can assert something similar to the following:
Let all clusters in the data (for some definition of cluster) that contain more than $\theta$ fraction of the ...
1
vote
0
answers
93
views
Deciding Features for K means Clustering
I have a Customer Transaction Dataset belonging to an Online Retail Company with the following fields:
DateKey – The date on which the transaction occurred
CustomerKey – Customer ID of the customer ...
1
vote
0
answers
63
views
Cluster Analysis for Ratio & Numerator-Denominator Data
My data is as shown below where ROE is being defined as (Revenue - Expenses)/Capital
Revenue | Expenses | Capital | ROE
I'm trying to do a cluster analysis (hclust in R) hoping to get some ...
1
vote
0
answers
48
views
Reliability of Elbow method with mean squared distance
Is using the elbow rule, with mean squared distance, for selecting the good number of clusters for Kmeans algorithm, advised in academia?
1
vote
0
answers
29
views
What makes a good sampling for K mean?
Say I have a csv files that I receive on a daily basis and each file contains 3,000 rows of data. I wish to create a K-Mean graph to uncover categories. How many items should I sample in order to get ...
1
vote
0
answers
126
views
optimization of run time to map large text data
I have trying to optimize the run time for my app which maps in 2D the text data according to the importance and weight of the words in each document. However, given the size of my text data of ...
1
vote
0
answers
52
views
Does a Local Minima Exists at K=2 in the Gap Statistic for the G-Means Algorithm
Currently, I am attempting to use the G-Means algorithm to attempt to solve the ill-defined image segmentation problem as it is a very algorithmically cheap solution to the ill-defined high-...
1
vote
0
answers
49
views
Cluster validation using supervised learning
I have a cancer patient dataset $X_1$ which consists of numerous features and two different sets of labels $y_1$ & $y_2$. I want to show that $y_2$ is a better clustering of patients than $y_1$; ...
1
vote
0
answers
902
views
Are negative values acceptable for the Variance Ratio Criterion (VRC)?
I'm using a tutorial for the Variance Ratio Criterion (VRC) by Calinski and Harabasz 1974 (pdf). In my case this entails the following steps:
Conduct k-means clustering on my dataset for k=2 to k=21
...
1
vote
0
answers
448
views
Cluster validation method for no cluster labels and differently sized clusters
I'm primarily a programmer and have little to no training in formal maths or statistics of any kind.
I'm working on my dissertation (which foolishly is about clustering data), the process is ...
1
vote
1
answer
105
views
Algorithm that partitions a set coordinates around X number of fixed centroid coordinates?
I understand that in K-means you select how many clusters you want and the result is the location of each centroid.
How does one handle a situation when you know how many and where each centroid is, ...
1
vote
0
answers
1k
views
Why is it that a larger 'k' value fails to converge but a smaller 'k' converges?
I'm doing clustering via GMM, which is initialized first by k-means.
I am using a data matrix that cannot be classified as small by any standards, they are usually of the size ...
1
vote
0
answers
124
views
Outlier similarity
I have a group of sensors where each sensor records 10 different binary data points which is then saved as an integer that can range from 0 to 2^10 - 1. To make sure that's clear, to put it another ...
1
vote
0
answers
41
views
Question regarding K-Means Multilable problem
I have a dataset where for a set of features I have a single label but in my prediction I wanted to predict upto 5 labels for each test data. The labels are categorical and the number of distinct ...
1
vote
0
answers
817
views
Clustering based on distance measure violating triangle inequality
Suppose I have a set of categorical data $X=\{x_1,x_2,\cdots, x_n\}$, (in my case $n =~ 10,000-50,000$) as well as a precomputed "distance" measure $g(x_i,x_j)$ (in my case I just have an array of ...
1
vote
0
answers
295
views
More consistent medoids from Lloyd's algorithm?
I wrote an implementation of Lloyd's algorithm in Python and was running some tests. My data set is 1D (specifically dealing ...
1
vote
0
answers
149
views
$k$-means clustering
I have two hundred $15 \times 15$ matrices containing correlation values between 15 nodes at 200 different time points. I want to cluster the 200 matrices using $k$-means clustering.
Question: Is ...
1
vote
0
answers
252
views
Text Clustering - Extracting meaningful title / description from the clusters generated
I use k-means algorithm to cluster my data(multiple reviews of an app). I need to generate meaningful sentences which will describe each of the cluster.
One approach that I tried was to find the data ...
1
vote
1
answer
119
views
Data transformations and regression/k-means assumptions
I have a set of independent variables and one dependent variable. I am performing regression analysis and k-means with those variables and I am wondering the following:
1) After reading this ...
1
vote
0
answers
501
views
X-Means Likelihood for BIC
I have recently been trying to understand the X-means method for deciding on K, using BIC. However I have become stuck on one particular equation in the original paper. On the 4th page, when ...
1
vote
0
answers
358
views
How to compare clustering algorithms of numerical and nominal data
I have a dataset for clustering including numerical and nominal variables. I would like to compare the k-means and k-medoids clustering algorithms and I would also like to find the optimal k-value (...
1
vote
0
answers
659
views
Why do final cluster centers change after applying results from past K-Means clustering (SPSS)?
I have a question regarding what happens after I apply k-means clustering centers to a new data set.
Basically, I ran k-means clustering on a dataset1, saved the cluster centers, and applied it to a ...
1
vote
0
answers
614
views
K-means for dataset with 10 million observations and k = 40 using packages "weightedKmeans"
I am trying to employ K means algorithm on a dataset which has 10 million observations. The unique identifier is a 9 digit US Zipcode and data is collected by a bank on its customers (regarding their ...
1
vote
0
answers
306
views
Initial clusters in Kmeans clustering using mahout
I am trying to perform kmeans algorithm on data using . The option that has to be passed while running need a path to initial clusters. Can anyone tell me how can we have initial clusters even before ...
1
vote
0
answers
190
views
"Hierarchical k-means" wrong sample assignment
I am working on a hierarchical k-means scheme which is translated into sequential k-means in my case.
Let say I have 10k samples (objects to cluster) which I want ...
1
vote
0
answers
1k
views
Kmeans plotting on discriminant coordinates
When you plot a kmeans model (in R) with the plotcluster() function, it plots the clusters against the axis of the 1st and 2nd discriminant components (dc).
In reading about these axis- some state ...
1
vote
0
answers
2k
views
Avoid local minima in kmeans
Many machine learning techniques suffer from the curse of local minima, one of them is K-means. I am using a matlab script for a computer vision task. One of the first steps I do is kmeans clustering ...