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
22 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,096
0 votes
1 answer
40 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,096
1 vote
1 answer
48 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 ...
1 vote
1 answer
24 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 ...
  • 133
1 vote
0 answers
37 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 ...
0 votes
1 answer
31 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
66 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
12 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
19 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
32 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
34 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
51 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
46 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
30 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
28 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
28 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
17 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
60 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
25 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 ...
  • 507
1 vote
1 answer
63 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 ...
0 votes
0 answers
16 views

K-Prototypes did not form clusters

I implemented a K-Prototypes algorithm (Huang) to cluster some mixed data in order to solve a customer segmentation question. There aren't a crazy amount of observations (n = ~6k) and with 8 fields (2 ...
  • 103
1 vote
0 answers
67 views

What does it mean by "variance of the distribution is spherical"?

I came across the post here which mentioned the following: k-means assumes the variance of the distribution of each attribute (variable) is spherical I wanted to understand what does it mean by &...
  • 161
1 vote
1 answer
68 views

Applying k-means over PCA

I have a dataset containing 20 columns and 200 rows. This is an unlabeled dataset and I applied PCA to this dataset for dimensionality reduction. After successfully using PCA, I received a dataset ...
  • 19
2 votes
1 answer
41 views

Infer limits of unscaled values from their standardized values - Clustering

I am working on a clustering problem and I have some skewed variables. So, I log transform them and use them in clustering. However, instead of multivariate clustering, I do multiple univariate ...
  • 2,096
2 votes
1 answer
56 views

Converting unsupervised to supervised problem - Overfitting - bad?

I am working on a customer segmentation using 5 features such as recency, frequency, monetary, tenure, unique_product_cnt etc. So, I did a RFM based segmentation where I used ...
  • 2,096
1 vote
1 answer
71 views

standardization/normalization for 1D clustering?

I have two input variables revenue and age. Am trying to find different bins within that variables. For ex: I have ...
  • 2,096
1 vote
1 answer
368 views

silhouette score vs Distortion score

I am working on segmenting my customers with clustering. My dataset size is 7315 rows and 30 features. So, as a beginner to clustering, I passed all my 29 features (excluding id column) to the cluster....
  • 2,096
9 votes
2 answers
736 views

What are the k-means algorithm assumptions?

I'm trying to understand what are the assumptions/hypothesis underlying the k-means clustering algorythm; specifically, I'm looking for a research/academic paper listing such hypothesis and explaining ...
  • 325
2 votes
1 answer
53 views

Why not link features instead of selecting them - Clustering

Currently, I am working on customer segmentation using their purchase data. I plan to use clustering techniques. So, my data has below info for each customer (9 features and 1 id field) Now I am ...
  • 2,096
0 votes
0 answers
12 views

Optimal number of Clusters [which]

I'm trying to find out the optimal number of clusters through different means. First off I started with kmeans and after the graphic I obtained I thought 4 would be the most optimal number of clusters....
2 votes
1 answer
57 views

Meaningful to retrieve original value after standardization using clustering

I already referred these posts here and here. Currently, I am working on customer segmentation using their purchase data. So, my data has below info for each customer Based on the above linked posts ...
  • 2,096
0 votes
0 answers
19 views

Are gaussian mixture models for clustering robust to data sparsity?

I would like to cluster customers based on their product usage data (20-40 products/dimensions) on the same scale. Overall, the data is reasonably log-normally distributed for all products (the ...
1 vote
1 answer
62 views

RFM Customer segmentation - Why Avg monetary value instead of total monetary value?

I am trying to segment our customers based on their purchase data. And I came to know about the RFM technique (Recency, Frequency and Monetary) through these posts here, here etc. Recency - How ...
  • 2,096
0 votes
0 answers
108 views

When we use k-means clustering with Light GBM, comparing with Random Forest

I am developping the prediction model with many parameters. As I was not satisfied by the performance of Random Forest Regression, I tried to use k-means clustering to regroup the similar variable and ...
0 votes
0 answers
14 views

How to avoid having very different examples inside a cluster with Kmeans?

Let's say I've created some clusters with Kmeans using 5 features, the Silhouette Score for these cluster are very high, higher than 0.8, and The within-cluster sum of squares is around 130 in this ...
0 votes
0 answers
26 views

Which clustering methodologies are likely to be best for this data?

I'm using the classic "use-case" example of clustering pixels in a photograph. I've tried K-means, agglomerative clustering, and DBSCAN. When I plot the RGB coordinates in 3-D space, all 3 ...
  • 115
1 vote
0 answers
30 views

Correlated variables and similar loadings in first principal component

I'm doing a K-Means model for first time, thus very low experience. I read that it is not bad to discard variables through some PCA analysis. After standardizing the data, the loadings (weights) for ...
0 votes
0 answers
12 views

Spatial clustering with maximum group weight

I am looking for a clustering method that would allow spatial clustering of a set of points (with weights associated to each point) with maximum cohesivity, where each group of points must have at ...
2 votes
1 answer
104 views

Confusion on why the value of SSE is lower when a cluster looks distorted on the plot

I have a dataset of shape (29088, 11). When I apply the Kmeans where K=2 I get the following plot: Cluster C0 has 8554 points (in blue) and cluster C1 has 20534 ...
  • 151
0 votes
0 answers
23 views

Clustering algorithms that support FA rather than PCA

In our social sci research we've used Factor Analysis rather than PCA. It would be helpful for us to use a clustering algorithm to group respondents into the most logical factor groups. Kmeans seems ...
  • 1
0 votes
0 answers
237 views

How should I determine the optimal number of clusters in kmeans in R with large data set?

I am right now dealing with a large dataset and I have used kmeans and fviz_nbclust in R with wss method to try to determine the optimal clusters in k-means clustering. But as the figure shows, the ...
  • 1
0 votes
0 answers
28 views

K-Means clustering should cluster data evenly distributed or unevenly distributed? [duplicate]

I am clustering customers using their stay time on our web sites. When I only use one variable, time, for K-Means clustering with 10 clusters, customers look unevenly distributed to each clusters. ...
  • 2,645
1 vote
0 answers
112 views

How to choose a fair gamma value when performing k-prototypes clustering?

In the k-prototypes clustering algorithm, the distance function consists of two dissimilarity components - one for the numerical elements of the observations, and one for their categorical elements. ...
  • 11
0 votes
0 answers
22 views

CH-index continues to fall instead of peaking

I'm doing a clustering exercise with k-means algorithm. The natural number of clusters of the dataset is 5. I'm testing number of clusters between 2 and 15, but CH-index keep decreasing with the ...
0 votes
0 answers
190 views

Shapley values for the three clusters by cluster number KMeans algorithm

I am trying to replicate this https://cast42.github.io/blog/datascience/python/clustering/altair/shap/2020/04/23/explain-clusters-to-business.html#Kmeans-clustering But using R and not Python as in ...
  • 1
0 votes
0 answers
12 views

How to generate states for a Markov-Model through K-Means-Clustering on time-series?

I am reading a paper by Zufferey et al.: https://ieeexplore.ieee.org/document/8442470 On page 2 it says: "In this paper, the definition of the states is based on a K-Means clustering which allows ...
0 votes
0 answers
44 views

Customer segmentation by category

I have a dataset where I must perform customer segmentation. The dataset columns are organized as follows: Franchise Store | Attribute 1 | Attribute 2 | .... | Attribute N The unique elements in "...
0 votes
0 answers
10 views

analytically determine how many clusters you need to get an explained variance of over x%

I am currently trying to cluster my data with as few clusters as possible. I have tried using K-means clustering and spectral clustering. Both work relatively well, around 85% explained variance from ...
0 votes
0 answers
53 views

K means clustering on long format data

I have a dataset of customers and some of their characteristics, including the total worth of goods purchased. Essentially, I have transaction line items. My data looks something like this: ...
  • 45
0 votes
0 answers
18 views

Any good method to identify the principal components on a low dimension timeseries dataset?

I have a low dimension (only 8 dimension) Time Series dataset of simple z-score standardized numerical data. Number of raw data point is about 2000 x 8. I tried running PCA on the dataset by splitting ...
  • 63

1
2 3 4 5
21