Questions tagged [k-means]

k-means is a family of cluster analysis methods in which you specify the number of clusters you expect. This is as opposed to hierarchical cluster analysis methods.

Filter by
Sorted by
Tagged with
0
votes
3answers
931 views

Confused about how to graph my high dimensional dataset with Kmeans

PLEASE NO SKLEARN ANSWERS So I have a dataset that is very high dimensional, and I am very confused about to convert it into a form that can be used to plot with Kmeans. Here is an example of what my ...
6
votes
1answer
16k views

K-Means vs hierarchical clustering [closed]

When hierarchical clustering is preferred over k means clustering?
0
votes
0answers
16 views

K-means clustering for east west airline marketing data. Confused in choosing the optimal clusters

Ques: The file EastWestAirlines contains information on passengers who belong to an airline’s frequent flier program. For each passenger the data include information on their mileage history and on ...
0
votes
1answer
36 views

Speaker clustering/diarization

I am working on the problem of speaker clustering. I am using k-means clustering. The ground truth cluster values and k-mean cluster values do not correspond due to different methods of labelling (...
0
votes
1answer
30 views

Unsupervised Learning::Satellite Images::Single Bands

Has anyone has success with building models using KMeans for classification? I have images that only have one band and it continues to fail. My guess is that the issue is with both size of the image ...
2
votes
2answers
790 views

Kmeans clustering with multiple columns containing strings

I have the following dataset: https://www.kaggle.com/carolzhangdc/imdb-5000-movie-dataset What I want to find is clusters based on imdb score per genre per country. I have created a pandas data frame ...
3
votes
1answer
123 views

Clustering with 0 or Null values

I want to do some clustering for a dataset where I am looking at 10,000 peoples usage of certain electronic devices. I have 11 columns; the first column is simply a URN representing each person in the ...
-1
votes
0answers
19 views

What are the dangers in iterating over KMeans n_clusters to build classification labels?

When using unsupervised learning to build classification labels, is there merit in iterating over the Kmeans or Agglomerative Clustering n_clusters value to build a range of features? Take for eg <...
4
votes
2answers
91 views

KMeans clusterization on documents

Whether correct or not, I'm not able to judge being myself in the early days of the Data Science. However, I have applied a Kmeans on a corpus where some random documents (very short sentences) have ...
0
votes
1answer
135 views

Kmeans cluster validation when I have labeled test data

I'm trying to implement the unsupervised k-means algorithm for sentiment analysis of imdb movie dataset created by stanford. The steps that I followed is : 1) Load the comments 2) Apply tokenization ...
0
votes
1answer
38 views

confusing regarding to kmeans clulstering for data correlation

I am trying to think through my process before doing any real coding. However, got really confused easily. Say I have 100 instruments and I know their price movements every day for a year. So I can ...
2
votes
1answer
1k views

Low silhouette coefficient

I am doing a kmeans clustering on a dataset of selling values of articles. Each article has 52 selling values (one per week). I am trying to automatically calculate the optimum amount of clusters ...
2
votes
2answers
100 views

Should normalization be applied?

I have more then 100 columns with the values of 1-0. But the two features at the end as seen in the below image, have different values then the rest. Should I rescale the values in the last two ...
0
votes
1answer
19 views

Will the features in the image (edge, color, etc.. ) impacts on the performance of the spherical k-means?

I am very new in Machine learning, I recently implemented the spherical k-means, but finally I found a interesting point from the result. I used four datasets, they are minst, cifar-10, fashion-minst, ...
0
votes
1answer
993 views

How to measure F1 score and NMI for clustering task?

I see the authors of this paper are measuring F1 and NMI scores to measure the clustering quality. However, I don't understand the algorithm of how they actually measure it. See the Evaluation Section....
1
vote
1answer
20 views

Clusterize Spectrum

I have pandas table which contains data about different observations, each one was measured in different wavlength. These observsations are different than each other in the treatment they have gotten. ...
0
votes
3answers
118 views

Why does changing the cluster number change the plot in Kmeans?

This might be a dumb questions but I can't find the answer to it. I don't have the perfect mathematical understanding of kmeans, so apologies if it is. I'm just wondering why I see a different plot ...
0
votes
1answer
96 views

Clustering (unsupervised learning) for uneven classes

I am looking for an unsupervised method that can see also the points that start to look different from the majority. Which clustering techniques (I use python) can be used for such data sets? I have ...
1
vote
1answer
42 views

Clustering after PCA: Use the standardized data, or take into account the variation explained at each PC?

I am interested in clustering daily gridded data. Because of the many dimensions (gridpoints), I first perform PCA to reduce the dimensionality and keep the n-first PCs that account for at least 85% ...
2
votes
1answer
37 views

Find shared properties of a cluster samples

I have a dataset which contains ~15 features. With the elbow method, I found out that the optimal number of clusters is probably four. Therefore, I applied the K-means algorithm with four clusters. ...
2
votes
2answers
685 views

K-modes implementation in pyspark

I'm looking for an implementation of k-modes in pyspark. I found this and this as implementations. First, I tried implementing k-modes using the first link and faced issues. So I went ahead and tried ...
4
votes
2answers
529 views

k-means|| in PySpark

I'm trying to apply k-means$\|$ clustering in PySpark. According to this paper, there is an oversampling factor, $l$, that would affect the model's cost. I couldn't find any parameter regarding ...
18
votes
4answers
19k views

K-means: What are some good ways to choose an efficient set of initial centroids?

When a random initialization of centroids is used, different runs of K-means produce different total SSEs. And it is crucial in the performance of the algorithm. What are some effective approaches ...
162
votes
13answers
205k views

K-Means clustering for mixed numeric and categorical data

My data set contains a number of numeric attributes and one categorical. Say, NumericAttr1, NumericAttr2, ..., NumericAttrN, CategoricalAttr, where ...
0
votes
1answer
30 views

Customer Segmentation: Should I use a variable, representing a product, that is unpopular in the dataset for K-Means Clustering?

I am working with a data set that, besides customer age and income, tells the balance a customer has in different type of bank accounts: Checking, Shares, Investment, Savings, Deposit, Mortgage, Loan, ...
1
vote
1answer
45 views

Clustering with Only Categorical Features

I am trying to do clustering with a bunch (24) of categorical features. I have done some research and found a lot of people recommending something such as K-Modes. I tried running K-Modes on my data ...
12
votes
1answer
130 views

What are practical differences between kernel k-means and spectral clustering?

I've been lately wondering about kernel k-means and spectral clustering algorithms and their differences. I know that spectral clustering is a more broad term and different settings can affect the ...
1
vote
1answer
373 views

Using PCA to cluster multidimensional data (RFM variables)

So i am performing k-means clustering on RFM variables (Recency, Frequency, Monetary). The RFM variables are in the form of quantiles (1-4). I used PCA and found the PCA components. I then used the ...
1
vote
1answer
26 views

How come same cluster category be separated?

I have these 200 vectors which were clustered using K-means clustering based on keywords weight similarity that was given by TF-IDF (Term Frequency - Inverse Document Frequency). The vectors were ...
2
votes
3answers
92 views

What best/correct algorithm/procedure to cluster a dataset with a lot 0's?

I'm new to statistics so sorry any major lack of knowledge in the topic, just doing a project for graduation. I'm trying to cluster a Health dataset containing Diseases(3456) and Symptoms(25) ...
3
votes
1answer
799 views

Randomstate and kmeans issues

I try to cluster a dataframe of 227 rows in 5 clusters using kmeans algorithm. Each time I run my code I got different labels and different clusters which make my analysis afterwards a bit tricky. ...
6
votes
1answer
2k views

How to make k-means distributed?

After setting up a 2-noded Hadoop cluster, understanding Hadoop and Python and based on this naive implementation, I ended up with this code: ...
1
vote
1answer
25 views

Decision boundary for KMeans clustering algorithm

Below code is used for plotting decision boundary for KMeans clustering. I understand contour in general, my question is, how does plot (contour method) know where to draw decision boundary based on ...
0
votes
0answers
12 views

Similarity matching between two distinct datasets (marketing case study)

I am working for a company that sells different products to customers. My objective is to find customers that are likely to purchase product X based on the profiles of customers that already purchased ...
1
vote
1answer
24 views

How to find slope of curve at certain points

how to find slope at certain points circled in blue in below curve ? Are these below 2 approaches valid ? though they give different results . How to automatically find the points where the slope ...
3
votes
3answers
544 views

clustering 2-dimensional euclidean vectors - appropriate dissimilarity measure

I've got a set of approx. 50 000 2-dimensional euclidean vectors which are connected with 20 groups, i.e. each group has approx. 2500 2-dimensional euclidean vectors. My data includes endpoints ...
0
votes
1answer
76 views

Clustering with groups in data related to cluster label

I want to predict which device got used in which room. Therefore I've got device and sensor data. My idea was to create a feature vector lie this: ...
7
votes
4answers
3k views

Determinate K in K-Means Clustering

I have salary data of several user (Python list). Now I am using KMeans to cluster them. Given this data, Is there a way to figure out the best value for 'K' automatically through program? I tried ...
5
votes
3answers
3k views

k-means clustering data with large number of meaningless values

I am looking to perform k-means on my dataset which contains a large number of 0 values. The last value you see is different to the others, that is simply the sum of transactions, not related to the ...
0
votes
2answers
4k views

Plotting k-means output - python

Can anyone help with plotting k-means results from GraphLab k-means tool. ...
4
votes
2answers
76 views

Cluster evolution over time

I have a dataset of transactional data with customer ID and I want to segment the dataset into groups using cluster analysis. I'm interested in following the evolution of each cluster over time, but ...
0
votes
2answers
58 views

customer segmentation with unbalanced data

I am trying to do a customer segmentation on my transactional data and I am struggling a little bit on the best approach. Since it is an unsupervised model I can throw it to any algorithm and get some ...
60
votes
8answers
73k views

Clustering geo location coordinates (lat,long pairs)

What is the right approach and clustering algorithm for geolocation clustering? I'm using the following code to cluster geolocation coordinates: ...
2
votes
1answer
31 views

What is the most straightforward way to visualize color-coded clusters along with the cluster centers?

I have applied the kMeans Clustering algorithm to a dataframe and have gained cluster labels for each row. I had selected only two features. There are 4 clusters. I want to visualize the datapoints in ...
1
vote
1answer
186 views

Should Principal components be normalized before applying K means on them?

I want to get the Principal components of a dataset and apply K mean clustering on them. Do I need to Normalized the PCA output before applying Kmeans on them ?
0
votes
1answer
35 views

Why Davies-Bould chose a number ob cluster higher than Silhouette or Calinsky Harabasz?

I am doing use several metrics in order to know what number of clusters is correct in order to do this I selected 3 clustering algorithms and 3 internal evaluation metrics, Silhouette, Calinsky ...
1
vote
2answers
26 views

Will one hot encoding / unbalanced columns cause bias to Clustering Analysis?

I'm wondering if having too many columns about one certain feature is gonna cause bias to the clustering analysis. For example, if my dataset has columns = ['incoming calls', 'outgoing calls', '...
0
votes
1answer
38 views

DBSCAN Clustering

I used K-means to get the number of clusters for my data(Elbow Method). Then I was trying to see if for some specific hyperparameters can we get the same number of clusters for DBSCAN. I tried Brute-...
1
vote
1answer
32 views

What criteria use in order to select the best internal validation for clustering?

I am doing homework about how to evaluate a clustering algorithm both hierarchical and partitional. For doing this I have a dataset that I can plot as you can see: The clustering algorithms that I am ...

1
2 3 4 5
7