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
0
votes
0answers
12 views

Which is the best clustering algorithm for clustering multidimensional data with low density difference?

I am working on a project currently and I wish to cluster multi-dimensional data. I tried K-Means clustering and DBSCAN clustering, both being completely different algorithms. The K-Means model ...
1
vote
1answer
7 views

Anomaly detection on high dimensional Data using k means/SVM/LOF?

I am working on one Anomaly detection problem (unsupervise problem) Data set have 1) 15 columns and around 8k rows , including normal and abnormal(outlier ) rows, without label , all are numeric ...
0
votes
1answer
449 views

Should I expect inertia from a K-Means solution on counts to be substantially lower than for a similar solution on percentages?

During exploratory clustering with K-Means on agents with a range of events, I created two sets of models across clusters with K in {2,..,9}. In one set, the model is fit using raw counts of five ...
0
votes
0answers
3 views

K-means clustering analysis when items are on different Likert scale?

I have a data of 300 participants who all filled in a questionnaire. I want to cluster these people regarding different features (burnout, engagement etc.). Some of the measurements are on a likert ...
0
votes
3answers
604 views

Prediction after PCA and K-Means

I have a data set with a large amount of features. I'm applying PCA on it in order to run it through K-means, to discover clusters in my data set. I'd like to know what is the best practice to make ...
3
votes
1answer
18 views

For K-means clusters, how can I ensure each cluster has a minimum of n numbers

I usually use k-means++ for initialization, which is considered to be the most effective. But sometimes, this results in some clusters having too few constituents. While this may be mathematically ...
6
votes
2answers
4k views

Akaike Information criterion for k-means

I am trying use the AIC & BIC for selecting the number of clusters for k-means. I found a post on Stackoverflow where some R code is posted, but I could not find any valid explanation for its ...
0
votes
1answer
229 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 ...
0
votes
0answers
16 views

How do I evaluate a K-Means unsupervised anomaly detection approach?

how do I evaluate K-means clustering anomaly detection method as there is no labelled data of anomaly class. To find the cluster (K), I have used the silhouette score from Scikit learn library. Scikit ...
1
vote
0answers
22 views

python find the optimal # of cluster for K-Means algorithm

I have a data that contains 24 features and all features have some missing values. I want to use the impute-KNN algorithm from sklearn to fill the missing values. However, before I do that, I think I ...
3
votes
2answers
2k views

K-Means clustering visualization & evaluation

I want to know after running K-means algorithm on a data set of say 10 variables and getting optimal clusters through Elbow curve--how do I to evaluate the goodness of these clusters (I mean apart ...
0
votes
0answers
14 views

Using clustering to determine a control group in A/B testing?

Problem described below: We have 5000 customers. We ran a test on 50 of the customers over a two week period. The operations of our business restricted us to running the test on a specific group of ...
0
votes
0answers
14 views

How do I interpret K-means model output from Pyspark ml. clustering library?

I am new to PySpark and learning how to build models using PySpark's machine learning libraries. I build a k-means clustering algorithm based on the code of this website. Now, I fed my data into the ...
0
votes
0answers
8 views

K-Means Clustering - Is my centroid distance off?

I'm using K-Means Clustering in BigQuery ML to detect anomalies. Here's the centroid, their values, and the count of rows attributed to that centroid: However, if you look at the below image, the ...
3
votes
2answers
531 views

Need a little help understanding K-means++ seeding

I have been working on a project that involves using K-means clustering for generating adaptive palettes from images. I understand the general process of K-means clustering, and I understand the ...
0
votes
0answers
16 views

Kmeans in high dimentions with features with different scales: how to normalize

I am developing an unsupervised clustering approach on a dataset with high variability. The dataset has 3 main characteristics, that makes it a little bit more complicated then others. The #of ...
1
vote
1answer
137 views

K-means gives non-spherical clusters

I am trying to cluster 24 month utilization behaviors of customers using sklearn/K-means in python. When I plot the customers by clusters in a 2-D space (Principal Components 1 and 2 of my 24-point ...
0
votes
1answer
39 views

Time Series clustering - is K Mean accurate?

My data set is composed by measurement of the same index for 14 years (columns) for 105 countries (rows). I want to cluster countries based on their index trend over time. I am trying Hierarchical ...
2
votes
1answer
82 views

Can the same cluster be found at different (nonconsecutive) iterations of k-means?

During a k-means process, could a cluster at iteration t be found identical to iteration t+h with ...
0
votes
0answers
12 views

K means clusters, would PCA be a better option?

I have the data below. I need to use a clustering method to classify them and into categories of "Heterozygotote, Allele 1, Allele 2 and No Call. The values in RFU1 and RFU2 are used to determine the ...
1
vote
0answers
15 views

K means clusters, would PCA be a better option?

I have the data below. I need to use a clustering method to classify them and into categories of "Heterozygotote, Allele 1, Allele 2 and No Call. The values in RFU1 and RFU2 are used to determine the ...
1
vote
2answers
4k views

why K-means Algorithm will terminate in a finite number of iterations?

I am trying to prove that the K-means algorithm will terminate in a finite number of iterations. But I got stuck on how to get start... and why, intuitively, it will terminate in a finite step? Any ...
0
votes
1answer
21 views

Visualize Analysis of clustering after pca

I am using kmeans for clustering and if I read the topics around here and somewhere else it is always recommended to do a graphical check-up for the number of ...
8
votes
3answers
9k views

How to avoid k-means assigning different labels on different run?

I have unlabeled dataset. I am running k-means flat cluster with 2 number of clusters. Every time I run the below program the labels are different. How can I make labels not to change. Is it even ...
0
votes
2answers
128 views

How to cluster temporal pattern of users with k means

I have data relating to the movement of travelers through a toll road based on a smart card. I have the ID of the individual and a datetime stamp for each time they pass through the toll (in either ...
0
votes
0answers
14 views

Intertia significantly decreasing after running multiple k-mean clustering models

I have been spending some time running k-means clustering models using scikit-learn on a variety of feature combinations and have been using the inertia value to compare models to one another. I've ...
1
vote
2answers
231 views

What should be the optimum number of features for 10 million observations for kmeans clustering?

I have a dataset of 10 million observations and 100 million features. I have to perform kmeans clustering on that dataset. The approx value of k is 30000 Is it advisable to perform clustering with ...
2
votes
2answers
37 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 ...
0
votes
0answers
12 views

Compare similarity between two different clusters having few similar fields?

I have two datasets, one is mentor dataset another is jobseeker dataset. My ultimate goal is to recommend a jobseeker to mentor based on skills and location (skills jobseeker has but need mentorship ...
0
votes
0answers
18 views

Preprocessing on unsupervised learning

I am working on a high dimensional problem that evaluates code readability according to specific metrics. The problem is that there is no 'ground truth' so I need to implement clustering (instead of ...
0
votes
1answer
53 views

What is the best k in kmeans clustering

I did clustering on a dataset of real-world patients and since the best way to choose the amount of clusters in KMeans clustering is Elbow method and the Silhouette method, I conducted those two and ...
0
votes
1answer
394 views

Given some words and their semantic similarity matrix, how best to group them?

Say, the words are road, highway, avenue, car, bus, train. Then they should be grouped as follows: street, road, highway, avenue ...
1
vote
3answers
3k views

Is K-means performance a bottleneck everywhere?

I've read a paper about a sped-up version of k-means: Ding et al. (2015). Yinyang K-Means: A Drop-In Replacement of the Classic K-Means with Consistent Speedup. Now I wonder, is k-means' ...
0
votes
0answers
19 views

K-means user clustering - data leakage problem

I am currently finishing up a clustering project on an e-commerce dataset. The steps that I've followed to find 7 different cluters has been the following Build rfm (recency, frequency, monetary ...
0
votes
1answer
123 views

Which clustering method and number of clusters?

during a cluster analysis procedure, how would I approach finding an appropriate number of clusters within my data? I've been experimenting with kmeans a little doing the following: run kmeans (with ...
0
votes
1answer
112 views

R kmeans function

I have a relatively large dataset (a few hundred thousand rows) and was running cluster analysis with R's kmeans function. I wanted to know whether R was training the algorithm on the full dataset or ...
0
votes
0answers
28 views

Is it correct to use permutation testing to find the significance of a clustering solution?

I am performing exploratory clustering with k-means in a multidimensional (82x18) dataset. The algorithm that I am using tests several number of clusters and uses several goodness of fit metrics to ...
1
vote
1answer
28 views

What is the difference in application between KNN and K-means

I know that KNN is a supervised learning method and K-means is an unsupervised clustering method. I also know their algorithms. What I am confused about is that what is the point having K-means given ...
0
votes
0answers
10 views

Stable time-series clustering

Given the olist dataset, I shall analyze Kmeans Clustering in time over a PCA decomposition .. Given two different month, clusters labels and distribution changes, that's normal .. But I have to ...
2
votes
1answer
129 views

Clustering vs. factor analysis for Likert items from a questionnaire

It’s been a while since I’ve done any statistics. The material I've read online and in books seem to be conflicting - so I would love a sense check to ensure that I am using the appropriate method for ...
55
votes
11answers
75k 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. ...
0
votes
0answers
11 views

how do we decide number of clusters in k-means clusturing? [duplicate]

As we need to give input of number of cluster we want while performing K-means clustering , I don't know how to decide on that ?
0
votes
0answers
34 views

Clustering before/after t-SNE?

My dataset contains 100 features about travel behaviors of ~500 users, created using doc2vec. I want to create clusters of these users and I'm planning to use either k-Means or DBSCAN algorithm. My ...
0
votes
1answer
122 views

Why is k correlated with the mean and variance of the distance between centroids in k-means?

I've noticed that if I'm doing k-means clustering (in MATLAB) on basically any set of data (not randomness), the mean and variance in centroid linkage distance appears to always be approximately ...
0
votes
0answers
15 views

How to show that GMM has the same assignment done as k-mean when the covariance is 0?

Given a Gaussian mixture \begin{equation}p(x) = \sum_{k=1}^{K}\pi_kN(x:M_k,\sum)\end{equation} with fixed uniform mixing weights $\pi_k = 1/k$ and has the same fixed isotropic covariance matrix $\sum ...
1
vote
0answers
10 views

Dimension reduction - doing a PCA on the coordinates of a MCA

I have a dataset with 25 continuous variables and 2 categorical variables. I want to perform k-means clustering, so as a previous step I am performing a multiple correspondence analysis on the ...
5
votes
1answer
649 views

Can silhouette be calculated with distances to centroids, instead of pairwise point distances?

I am using Silhouette cluster validation for each repetition (for a specific K) of k-means, k-modes and k-medoids. All the definitions of Silhouette I see calculate the distance of each point to ...
0
votes
1answer
396 views

k means clustering for larger text fields

I'm a beginner in data science/machine learning and am attempting to work through some problems on my own I am running a K-means clustering on a dataset consisting of "mission statements". These can ...
0
votes
2answers
2k views

Outliers detection for clustering methods

I'm in the middle of a result analysis for some clustering methods, doing quality tests for different clustering outputs coming from a singular input dataset where data preprocessing and cleaning ...
3
votes
2answers
5k views

Density calculation in K Means clustering

With the K Clusters generated using K Means Clustering, how do we calculate the density of each cluster? Is there any formula for it?

1
2 3 4 5
18