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
1 vote
1 answer
54 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
1 answer
215 views

SSE for K-means and K-medoids

I am trying to understand given same data set and same K - will the SSE of K means be higher than K Medoids or not. both try to minimize the SSE and K-medoids is more robust to outliers - does it mean ...
0 votes
0 answers
24 views

Weighted Cluster Analysis [closed]

I wanted to run a weighted cluster analysis in R, however, I do not find any suitable method. Kmeans offers a weighted solution (flexclust package). However, hclust or 2 Step Cluster Analysis does not ...
4 votes
2 answers
380 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 ...
0 votes
0 answers
8 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
14 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
25 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
33 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 ...
1 vote
1 answer
31 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, ...
0 votes
0 answers
23 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 ...
2 votes
3 answers
3k views

Standardizing some features in K-Means

I have 21 features in my dataset, some features are more important than others. As a fact I know, if I don't standardize (mean=0, SD=1) any features, then features with low variance will have slightly ...
2 votes
2 answers
4k 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 ...
1 vote
0 answers
27 views

Do I correctly apply hierarchical clustering and K-means on the resource-selection-function values?

I'm trying to find the best way to classify bivariate point patterns in spatstat according to the relationship between two point species: Point pattern ...
0 votes
1 answer
25 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
2 votes
2 answers
4k views

LDA, PCA and k-means: how are they related?

I am trying to understand how linear discriminant analysis (LDA) is related to principal component analysis (PCA) and k-means clustering method. As an example, here is a comparison between PCA and k-...
0 votes
1 answer
19 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
24 views

cluster 2d matrix (clustring)

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

Compare clustering results with different attributes and number of clusters

I used K-means to cluster a large data set that has millions of samples. I tried to create the clusters with different sets of attributes, which, as a result, generated different optimal number of ...
0 votes
0 answers
15 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
1 answer
307 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
0 answers
29 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 vote
1 answer
22 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 ...
57 votes
11 answers
91k 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. ...
1 vote
1 answer
217 views

K-Means clustering: optimal clusters for common data sets

I use scikit-learn to get IRIS and WINE clusters for evaluating an algorithm for K-means clustering. The K-means algorithm is a heuristic algorithm for solving the "minimum-sum-of-squares-clustering (...
2 votes
1 answer
862 views

k-means/k-nearest neighbours on multi-dimensional scaled data

I used the Python manifold library for multi-dimensional scaling on my distance matrix. Can I use k-means or k-nearest neighbours on ...
3 votes
1 answer
3k views

How to determine the best batch-size value for Mini Batch K-means algorithm?

I am working on a project where I apply k-means on severals datasets. These datasets may include up to several billion points. I would like to use mini batch k-means to save time. However, the mini ...
1 vote
1 answer
41 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 ...
3 votes
2 answers
1k views

k-means with several repetitions

In matlab and python, when running k-means, it is possible to set several repetitions (with random init) so that all of them in the end are combined to have stable global result? I am wondering how ...
1 vote
1 answer
50 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 ...
0 votes
0 answers
15 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 ...
0 votes
1 answer
505 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 ...
1 vote
0 answers
33 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 &...
9 votes
2 answers
665 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 ...
0 votes
1 answer
3k views

how to calculate the distance between cluster center and datapoint in K-means

I'm learning about the K-means model. I'm going to detect the anomalies using the k-means for that I need to calculate the distance between centers and point how should I do that.
1 vote
1 answer
61 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 ...
2 votes
1 answer
38 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 ...
38 votes
2 answers
52k views

How would PCA help with a k-means clustering analysis?

Background: I want to classify the residential areas of a city into groups based on their social-economic characteristics, including housing unit density, population density, green space area, housing ...
1 vote
1 answer
466 views

SPSS K-means Clustering: "Not enough cases to perform cluster analysis"

As you can read in the title I get the error message "Not enough cases to perform cluster analysis" after trying K-Means Clustering including all the variables (or columns). I will try to ...
0 votes
0 answers
65 views

Jenks optimization - goodness of variance fit interpretation

I am working on clustering/grouping 1D data. I am trying to find bins of multiple variables seperately. So, I tried the jenks natural breaks algorithm. Based on the ...
0 votes
1 answer
173 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....
1 vote
1 answer
52 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 ...
0 votes
1 answer
466 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 ...
2 votes
1 answer
48 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 ...
1 vote
1 answer
37 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 ...
1 vote
0 answers
37 views

Non-negative matrix factorization clusters

NMF can be used for clustering i.e., $V=WH$ where $W$ represents cluster centers and $H$ represents the membership of samples. But can NMF alone cluster the samples? Can we get better clusters in NMF ...
0 votes
0 answers
11 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....
1 vote
1 answer
213 views

How to compare clustering results between "raw" and normalized data

I have a dataset and I would like to apply a clustering algorithm to find some groups. I do not have any label, so it is just wondering if I can find relevant clusters. If it may help, it is ...
0 votes
0 answers
14 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 ...
0 votes
1 answer
46 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 ...
0 votes
0 answers
72 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 ...

1
2 3 4 5
21