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
0 answers
9 views

convergence rate for algorithms that stop in finite steps

I know that the k-means algorithm converges in finite steps, see Proof of convergence of k-means. This result implies that the algorithm converges in finite steps. The general definition of the rate ...
1 vote
2 answers
35 views

Can I use K-Means to group customers based on a single variable?

I have a test dataset of 11m records. The dataset contains a global customer id and spend figure. I need to group customers into the following categories: 0 Low 1 Low/Med 2 Med 3 Med/High 4 High I ...
0 votes
0 answers
23 views

How to identify the clusters in SSE plot?

How to determine the number of clusters from the following plot?
  • 1
0 votes
0 answers
16 views

Can you apply a k-means clustering algorithm to identify different levels of severity of a single system state? (ML applications in social sciences)

I'm new to Machine Learning, and am parsing through different applications of k-means clustering for my research. In one study, I saw the application of k-means clustering to determine different ...
  • 1
0 votes
0 answers
73 views

Question on the proof of convergence of K-Means

First, the question has answers here and here, however I am still slightly confused. Let's state the problem formally below, extracted from Bishop's Pattern Recognition and Machine Learning book, ...
  • 715
1 vote
1 answer
41 views

Unsupervised learning: How to identify differences between clusters?

I'm learning about unsupervised learning and I tried to use KMeans, AgglomerativeClustering and DBSCAN on the same datase. The result was ok, they seems to work fine according silhouette_score() ...
2 votes
0 answers
33 views

Does it make sense to transform a feature containing hours (24h) into two features with xy-coordinates of each hour in the space? [duplicate]

I have a clustering problem that I might solve with an algorithm based on Euclidean distance (e.g. K-Means). One potential feature is the "hour" at which each user began an interaction. As ...
  • 354
0 votes
0 answers
14 views

How do I choose k for k means clustering [duplicate]

Given a set of points, I'm trying to find the right cluster. However, I am lost on what the process is. Here is the graph of all possible points. I am unsure what I should look at
user avatar
2 votes
1 answer
30 views

Choosing the best clustering algorithm and evaluating the results

I'm trying to separate my data into clusters using the k-means algorithm and the hierarchical algorithm, choose which algorithm fits my data the best, and evaluate the results. However, all of my ...
  • 61
0 votes
0 answers
31 views

How to interpret the Scatter Plot result from PCA? [duplicate]

I have a project in school about clustering analysis. I have applied standardization and principal component analysis (PCA) to my dataset (I used K-means), which is about heart disease patients. I ...
1 vote
1 answer
46 views

In $k$-means, how is it NP-hard if the dimensionality of the data is at least $2$ ($d\geq 2$)?

In $k$-means, how is it NP-hard if the dimensionality of the data is at least $2$ ($d\geq 2$)? Can someone justify or give reasons to this statement? Any guidance would be appreciated.
0 votes
0 answers
25 views

K-means clustering of 3D data doesn't seem group data points based on their pattern

I have some 3D data and I used python programming to cluster these data. Based on elbow plot, I decided that 2 clusters would be the best choice of the number of clusters (k). When I did kmeans ...
  • 93
0 votes
0 answers
14 views

K-means on linearly projected features

I am looking for references on K-Means applied to linearly projected features instead of to the original features, in the sense that both K-Means and the projection matrix are learned at the same time....
  • 213
1 vote
0 answers
25 views

Can K-means put most of the noise in the same cluster?

I am working on clustering text data (very short sentences) vectorized with tf-idf. The data are characterized by high sparseness and the presence of abundant noise (considered here as documents that ...
  • 11
2 votes
0 answers
29 views

How can I ensure both levels of a binary variable are represented in every cluster?

Let's say I have some continuous variables and a binary treatment indicator. I want to cluster my observations based on the variables while ensuring that each cluster contains at least one member of ...
  • 26.7k
2 votes
0 answers
36 views

How does this prove that the objective function in K-means clustering never increases?

I am reading the ISLR textbook (pg. 518-519, 12.4) and having trouble understanding why K-means clustering never increases. I can understand it conceptually but I don't understand the mathematical ...
1 vote
2 answers
153 views

Time series clustering on large data

I am trying to do K-means clustering on my data which has time series length of 3700 and for (latitude,longitude) points of around 6000 in length. However, timeseries clustering using tslearn package ...
0 votes
0 answers
25 views

How to do Clustering in Python on a Huge Dataset?

On a game-related dataset, I have been assigned with the task to consign several account ids to 6 distinct clusters based on their behavior pertaining to over 25 different metrics which are used as ...
0 votes
0 answers
15 views

Optimum Number of Clusters from Inertia Function

I'm poking around K-means clustering in SKLearn for a course. For finding the optimal number of clusters for a k-means clustering model, the course cites finding the 'elbow' of the inertia function. ...
0 votes
0 answers
17 views

Clustering small group versus very big one

I'm working with a big set of data and I want to do some unsupervised clustering about the acoustic events that occur in a big set of recordings over a long time. Some of this events are very ...
  • 1
0 votes
0 answers
67 views

SPSS: how to calculate nearest neighbor from k-means centroids

the subject of my problem is related to cluster analysis. Specifically, with SPSS I am conducting a cross-validation procedure based on splitting the sample data into two independent halves (subsample ...
  • 1
0 votes
1 answer
46 views

Can the loss of KMeans increase?

Let's say we have a dataset, and we run KMeans with k clusters. Is it possible that during the execution of KMeans the loss first decreases and than increases until ...
2 votes
0 answers
35 views

Normalization/standardization impact on T-SNE and K-means

I have a dataset of 20K samples on 27 features that I am trying to cluster with k-means. The dataset is in its majority rather sparse, i.e. 98% of samples have a single nonzero value in one of its ...
  • 21
0 votes
0 answers
18 views

Gene expression clusters

I am working on a gene expression project in which my database is based in a cohort of individuals distributed in 3 groups (according to treatment), and 2 measurements (baseline and post). I am ...
2 votes
1 answer
51 views

PCA : how to cluster data to differenciate my data the most while considering their groups

I have to do a PCA in R for a project, but I have 300 data in 15 differents groups, and I want to find the reduced space which gives me the most variability between the groups and cluster my data in ...
2 votes
2 answers
497 views

Implementing cross-validation to tune the hyperparameters of an unsupervised model

I have extensively researched the application of cross validation for unsupervised learning (as it is a requirement by my project manager) but it seems that there is no clear consensus as to how to ...
  • 35
1 vote
1 answer
37 views

If I convert continuous data into ordinal discrete data, but number of the class is 100(1 class per 1 percentile), can I say this is 'continuous'?

I have some continuous data, and want to do kmeans clustering with this. But weirdly when I did kmean clustering with this data, the outcome was very conflicted with my presumption. So I decided to do ...
  • 23
0 votes
0 answers
22 views

Regarding kmeans clustering, is it ok if I set the number of clusters just to get appropriate number of data of target cluster that I'm interested in?

For example, let me suppose that I have 100 thousands of geospatial data in my dataset, and I want to extract certain group that which is the most crucial. So I decided to do clustering and pick 'one ...
  • 23
1 vote
1 answer
47 views

Distance function that captures both circular and "appear as line" clusters [closed]

based on what I know in k-mean clustering, if i use single linkage distance it can capture clusters of thread shapes but it is not suitable for capturing circular clusters. Also If we use complete ...
0 votes
0 answers
22 views

KMeans data treatment

I have a dataset with a set of features regarding: Age Country TypeA1 TypeB1 TypeC1 Where Country is a feature that can have 195 different potential values, ...
0 votes
0 answers
168 views

Jenks Natural breaks - Interpreting Goodness of Variance Fit

I am trying to find breaks in a multiple continuous type variables. So, I tried the jenks natural breaks algorithm. Based on the code from here, I managed to find ...
  • 2,310
0 votes
1 answer
47 views

Does statistically simple algos qualify as AI algos?

We have a customer purchase transaction history data with variables like below recency - how recently they bought? frequency - How often they bought? monetary - How much value did they bring to the ...
  • 2,310
1 vote
1 answer
282 views

Clustering leading to visually overlapping clusters on scatterplot

I am dealing with a dataset with 13 features. After going through some standard scaling and missing data imputation, I use kmeans from sklearn to create clusters. Now the point is that, although the ...
2 votes
1 answer
36 views

In k-means, why does the sum of distances to the cluster not account for the size of the cluster?

Wikipedia gives one formulation for the k-means problem as: where we intend to find a set of clusters $S = \{S_1, \ldots, S_k\}$ to minimize this value. However, the equivalent formulation divides ...
  • 205
1 vote
0 answers
43 views

Differentiate between two set of points

Consider two sets of points (in the pictures below), whose "center of gravity" is same. What measure can differentiate between the two sets? e.g. Image 1 ...
  • 161
0 votes
1 answer
69 views

Model based clustering equivalent to K means?

Is it OK to say something like this: "A model-based clustering with a hard threshold is equivalent to a k means clustering"? One of my instructors stated this in his slides, I kind of doubt ...
1 vote
1 answer
79 views

Features differ between classes

Good evening everyone. Regarding the topic related to Sparse Clustering (for example K-Means). For example, in "Witten DM, Tibshirani R. A framework for feature selection in clustering" the ...
0 votes
0 answers
20 views

Is clustering multiple samples of clusters a good idea?

I've been working for a couple weeks in a clustering model for finding best groups and correlations between categories. So far I've proven results heuristically according business rules, but I've ...
0 votes
0 answers
41 views

How to check whether the KMeans clustering have the appropriate labels for each group?

I am doing a Kaggle customer segmentation clustering problem and my current results or labels have quite strange problems: In one label group, the customers who have a high spending did not have a ...
1 vote
0 answers
45 views

Statistical method for finding homogeneous groups of curves

I need to divide a set of 100 or more response curves into groups. These curves are formed by backscattering intensity along a range of frequencies. Basically, each curve represents the intensity in ...
1 vote
1 answer
74 views

Can we do clustering over several columns in a huge dataframe?

I have a dataset stands for customers retail sales data, it includes customer ID, Age, ...
1 vote
1 answer
215 views

Comparing clustering methods based on internal Cluster Validity Indices

I have used the R package dtwclust to generate clusters for more than a thousand time-series objects.Since I did not have any prior information on the number or validity of clusters, I used a suite of ...
  • 21
0 votes
0 answers
56 views

Comparing clustering performance of two datasets?

For example: Let's say I have dataset A: Measured body temperature of a person during the day. I have measurements from 3 people in the span of a year. If I cluster it, I expect the clusters to ...
0 votes
1 answer
69 views

In R perform k means clustering with k=3 and euclidean distance a 100 different times [closed]

I would like to perform k mean clustering with k=3 and the Euclidean distance a 100 different time. But it only gives me 2 iterations, how do i do a loop so it give me 100. Thanks
  • 3
0 votes
1 answer
75 views

Time Series clustering: clustering a dictionary of time series

I'm working on classifying times series to find clear pattern of use. My data is collected from clients of a telecom company, and we want to detect pattern of the amount of data consumed by clients ...
0 votes
0 answers
54 views

cluster 2d matrix (clustring)

i have a 2d Matrix and It contains specifications for laptops, where each group contains three components like thant : ...
0 votes
0 answers
24 views

Measuring Similarity of Multidimensional Time Series

Suppose I have a non-linear time series comprised of 100 timesteps, within each I have 4 features for each of 50 observations. The features are not independent of eachother and the relationships ...
0 votes
0 answers
154 views

K-prototype in R: Error when including missing values

I want to cluster data that includes categorical (dummies and variables with multiple categories) and numerical variables (normalised) and a substantial amount of missing values. One reason why I want ...
  • 1
1 vote
1 answer
38 views

Can the gaussian mixture model combined in clustering?

Suppose I have a data with two clusters. Suppose further that I cluster the data using, for example, K-means. Then, can I fit a mixture model to each cluster? That is, can I fit a gaussian mixture ...
  • 589
1 vote
1 answer
175 views

Clustering Data with Time and ~10 million records

I have a dataset with features like product categories, their dimensions, price, units sold on a given day. I want to create clusters out of this dataset (~12-15 million records) and I am using data ...

1
2 3 4 5
21