Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
5 votes
2 answers
2k 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 ...
4 votes
1 answer
1k views

A proof of within-cluster sum of squares?

Anyone can provide a proof of the following equation as in @cardinal 's answer? $x_i$ and $x_j$ are vectors from the same clusters。 $\sum_{i,j} ||x_i - x_j||^2 = \sum_{i \neq j} ||(x_i - \bar{x}) - (...
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
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 ...
2 votes
1 answer
370 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 ...
1 vote
1 answer
28 views

Is this the right approach to cluster using many different evaluations on the same dimension?

I'm working on a project where I want to sort political parties into two groups. I want to do so using the answers of many respondents in a survey who indicated for each party where they see them on a ...
2 votes
1 answer
777 views

Clustering spatial data based on location and values

I'm looking for a way, preferably in R, to create a cluster of point data (specifically, the centroids of UK postcodes), where each cluster comes as close as possible to containing a certain number of ...
3 votes
1 answer
28 views

What is "clall" in index.Gap in "clusterSim" R package?

I am using the "clusterSim" package in my project (https://cran.r-project.org/web/packages/clusterSim/clusterSim.pdf, page 39) and I do not understand the meaning of the "clall" ...
0 votes
0 answers
62 views

Variable importance in cluster analysis

I'm new to the cluster analysis, read lots of things but I'm not able to understand how to variables are ordered into cluster. I mean, I find that my data are clustered into 3 different cluster, but ...
0 votes
1 answer
154 views

Applying clustering algorithms after t-SNE in R

So I'm doing my bachelor`s work and I'm applying different clustering algorithms on certain data. Before all the clustering of course I'm using a dimensionality reduction algorithm such as t-SNE for ...
user avatar
1 vote
1 answer
356 views

K-means dominated by one or two variables only

What should we do if clustering such as K-means is dominated by one or two variables in the list of used variables? Shall we leave the other variables?
1 vote
1 answer
265 views

Clustering Analysis for large data in R

I am trying to perform a clustering analysis for a csv file with 50k+ rows, 10 columns. I tried k-mean, hierarchical and model based clustering methods. Only k-mean works because of the large data set....
3 votes
1 answer
341 views

K - means cluster always landing right on top of whole dataset mean

I have a so so sized data set - 30 000 observations. I would like to run K-means on them but to restrict the center(mean) of the data. This is, I would like to push the clusters away from this mean. ...
1 vote
1 answer
604 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 ...
2 votes
1 answer
84 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 ...
1 vote
0 answers
99 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
288 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, ...
2 votes
3 answers
4k 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 ...
0 votes
0 answers
337 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
0 answers
313 views

How to compare consistency between clustering results and list of values with different levels in R?

I found similar subjects on the website but I may have missed the relation with my own question. I'v seen questions about comparison of clustering results, but here it's more about comparing two lists ...
7 votes
2 answers
15k views

Negative BIC in k-means

Probably a simple question but I'm trying to interpret BIC for k-means. I have some k-means clustering and calculating BIC gives me a negative value, with a plot something like this: ...
0 votes
0 answers
44 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 ...
2 votes
0 answers
334 views

interpretation of elbow plots [duplicate]

Hi I have this elbow plot that was created to select the K for clustering but I can't find a sound explanation of how to interpret this, all I ever see is a picture of an elbow with in plots with ...
40 votes
2 answers
41k views

How to use both binary and continuous variables together in clustering?

I need to use binary variables (values 0 & 1) in k-means. But k-means only works with continuous variables. I know some people still use these binary variables in k-means ignoring the fact that k-...
0 votes
0 answers
309 views

How to "characterize" clusters (e.g K means)

I ran the K-means clustering algorithm on the iris data using the R programming language: ...
2 votes
1 answer
1k views

K-Means Clustering of time series in R

I want to create a cluster of K-Means of time series with R but I don't know where to start. Could you recommend some articles or tutorial?
0 votes
0 answers
15 views

K means clustering with survey data [duplicate]

I have a dataset obtained from a survey, where all questions are likert-type, but with different scales (1-5 or 1-2). Is it possible to run k means clustering if I rescale all to 1-6? Additional ...
0 votes
0 answers
935 views

How to find the accuracy of k means in R

I have UsArrests dataframe and i am trying k means clustering algorithm. I ve tried with and without scaling the data . How i can decide which data i must take ? I must see the Within cluster sum of ...
5 votes
1 answer
19k views

How to interpret the clusplot in R

I have plotted the Bivariate Cluster Plot (of a Partitioning Object) using the clusplot from the cluster package. Following is ...
2 votes
2 answers
72 views

How to make clusters (consisting of demands) equal to the load of a truck?

I am working on a routing problem where I have thousands of points (places) with individual demands (in Weight and Volume). So far I have created 5 clusters based on their location. Now I need to ...
0 votes
1 answer
93 views

Can K-means be used to group data in win/lose categorical values for prediction purposes?

Currently I have a dataset with matches played by a team against other teams. Some of the variables are: kills, deads, assists, amountgold, amountdamagedone, result(win/lose). What I want to do is ...
2 votes
0 answers
158 views

How to perform cluster analysis on categorial data in R

I have survey data with 1000 respondents, each one has awnsered 20 questions related to different product features of a car. Each question could be awnsered as "good", "indifferent"...
1 vote
1 answer
2k views

Confusion matrix for k-means algorithm

Using R, I ran the K-means algorithm on a dataset with 1m+ rows. Using elbow plot, the optimum no. of clusters was found to be 3. Now each data point is assigned a cluster from the set {1,2,3}. But I'...
0 votes
1 answer
226 views

How to understand which is the optimal k number?

I have this plot but I would like to understand which is the optimal k number only by watching this. I already did the silhouette method and gap statistics, the first shows me optimal number equal to ...
3 votes
2 answers
569 views

Kmeans algorithm cyclical solution

I am currently implementing a Kmeans clustering algorithm in R. I am not using any packages and I wrote it from scratch. I am using only one set of initial guesses, and my action upon finding an empty ...
0 votes
0 answers
72 views

How to initialize k-means

I am working on image processing. I have to apply k-means upon them. But I am confused with the initialization of k-means that either I should use just first frame or all the frames to initialize it. ...
1 vote
1 answer
1k views

Customer behavior analysis and clustering using data from loyalty program?

I'm trying to do some analysis on customers behavior. Basically, I have information on customer's loyalty points activities data (e.g. how many points they have earned, how many points they have used, ...
2 votes
1 answer
668 views

Market / Customer Segmentation - Merging two different segmentations

I have a database where each observation is a person. They were questioned on their attitude towards the consumption of X category of product. I have being using K-means to segment this data. I have ...
12 votes
2 answers
24k views

Compute BIC clustering criterion (to validate clusters after K-means)

I'm wondering if there is a good way to calculate the clustering criterion based on BIC formula, for a k-means output in R? I'm a bit confused as to how to calculate that BIC so that I can compare it ...
11 votes
3 answers
12k views

Choosing clusters for k-means: the 1 cluster case

Does anyone know a good method to determine if clustering using kmeans is even appropriate? That is, what if your sample is actually homogenous? I know something like a mixture model (via mclust in R) ...
3 votes
1 answer
2k views

Assign new data to a cluster (using Gower distance and PAM algorithm)

I have a dataset which has mixed data types and hence I used Gower dissimilarity matrix as input to cluster the data using Partitioning Around Medoids (PAM) algorithm. I wanted to know if there is any ...
0 votes
1 answer
342 views

Using the ARI to validate clusters

To validate the results of a clustering solution, I am using the ARI to quantify the agreement with a reference classification method. Something which I do not quite understand is the concept of a "...
1 vote
0 answers
327 views

Strange data point clustering in k-means

I am trying to explore weather impact on bike usage using k-means clustering. However, the plot does not look correct; visually, some data points obviously belong to another cluster that is closer ...
1 vote
1 answer
6k views

Elbow method not giving a proper curve [duplicate]

I am trying to determine how many clusters to use for my k-means clustering using different methods. Gap statistic is giving me k=4 and Silhouette k=3. I have run k-means with both values and both of ...
1 vote
2 answers
2k views

Interpreting kmeans output

I am working on a clustering model with the kmeans() function in the package stats and I have a question about the output. My data is a sample from several tech companies and AAPL._UP is a variable ...
4 votes
2 answers
3k 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 ...
1 vote
0 answers
19 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 ...
0 votes
2 answers
398 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
1 answer
64 views

k-means method clarification

I am pretty new to k-means and cluster analysis methods, but I am trying to do it on 5 different measures of inequality and redistribution (Gini, P90/P10, Atkinson with different parameters and the ...
-1 votes
1 answer
27 views

How do i cluster these data?

So basically, I have this data: ...