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
1answer
17 views

Explaining the similarities between instances in a cluster with KMeans

If I create clusters using the KMeans clustering algorithm in Python, is there any way I can find which attributes were used to group those instances in clusters? Example: I have a dataset of cars ...
0
votes
0answers
14 views

K-means related question

I am a new user to Matlab kmeans and have the following question: I would like to use the following call from a Python application which is listed in this URL. ...
0
votes
1answer
48 views

Create clusters based on specific keywords

I am working on raw text data. I am using clustering to put together common words in the documents. My requirement is to create clusters based on a specific list of words i.e I want to get a group of ...
1
vote
2answers
899 views

When should we choose agglomerative clustering over K-means clustering?

I was working on a clustering based model and I read about hierarchical clustering and K-Means clustering. Under what conditions should I choose agglomerative over K-means clustering?
1
vote
1answer
26 views

Which algorithm would be suitable for clustering a billion datapoints?

I am running a K-means algorithm (using the sklearn implementation) on an aggregated dataset of ~350k datapoints on a 6 dimension hyper-plane (using 6 features). I ...
2
votes
1answer
34 views

How does the inertia cython implementation in scikit-learn for kmeans work? [closed]

Specifically, what do the & symbol stand for? and why is the column index always 0? ...
1
vote
0answers
20 views

Compute similiarty between labels

I have a labeled dataset and I created a duplicate of this dataset and removed the labels and applied K-means clustering with k= the number of labels in the original data set I want to compute ...
1
vote
1answer
186 views

Unsupervised Text Classification with Python: Kmeans

I am working on a project to build a text classifier of questions being asked. There are no labels provided in my data so I have chosen to go with an unsupervised approach. This solution needs to read ...
0
votes
0answers
106 views

what is the difference between strong and weak clustering?

What is the difference between strong and weak clustering? and what algorithm is considered as strong and weak clustering? Is fuzzy c-means and bisecting k-means considered as strong clustering? I ...
1
vote
0answers
27 views

What is the optimal method to evaluate clusters further?

Supervised learning is straightforward on medical data using Orange, but unsupervised learning is more challenging. I selected a data set based on Florida County Health Ratings where individuals rated ...
0
votes
1answer
327 views

Can distortion be derived from inertia rather than recalculating it from scratch in case of kmeans?

I got this definitional difference between distortion and inertia from here: Two values are of importance here — distortion and inertia. Distortion is the average of the euclidean squared distance ...
1
vote
0answers
33 views

Considerations to take into account when clustering

My idea is to use clustering to perform stock segmentation based on risk, building different risk levels that might adapt better to different kind of users. Hence I have computed different risk ...
0
votes
0answers
36 views

Feature scaling for clustering

I want to cluster groups, using K-Means, DBSCAN, etc. algorithms, based on lat-lng coordinates along with other features such as dummy variables, continues variables (in different units). What would ...
0
votes
0answers
7 views

Clustering of longitudinal user generated data; determine at what point in time does the user "become" the final clustering outcome

I analyse a lot of telephone call log data sets (akin to user generated data) and I use k-means clustering a lot to look at the types of callers that exist in the data set. The callers are clustered ...
1
vote
2answers
33 views

Clusterize item set with items as vectors of features

I have to clusterize this dataset in which I have houses and water consumption in this form: $$ House1 = (x_{1},x_{2}... x_{n});\\ House2 = (y_{1},y_{2}... y_{n});\\ House3 = (z_{1},z_{2}... z_{n});\\ ...
1
vote
2answers
885 views

How do I calculate distance of test data point from centroids in KMeans scikit-learn?

I am using Kmeans clustering on my data After training the model, I want to calculate the distance between Test Data points and CLuster centers. How do I do it? ...
1
vote
0answers
64 views

How is k-means implemented in CNN?

I am new to CNN and want to try implementing YOLOv4 with a custom dataset for vehicles. As I understand it, k-means clustering is done to give labels to a set of data. I was going through some papers ...
0
votes
0answers
24 views

What's the best way to detect crowds?

I have a dictionary containing people and the distance between each pair in the following format: ...
1
vote
1answer
133 views

How to interpret results of a Clustering Heart Failure Dataset?

I am doing an analysis about this dataset: click In this dataset there are 13 features, 12 of input and 1 is the target variable, called "DEATH_EVENT". I tried to predict the survival of the ...
1
vote
1answer
332 views

Why the Silhouette Score and optimal number of Cluster changes when using 2D and 3D data?

I am experimenting with Kmeans clustering. My data (vectors) was in 300 dimensions which I am converting into 2D and 3D using PCA. Now, to find the optimal number of clusters, I used the Silhouette ...
1
vote
1answer
27 views

Is knn similar to this version of k-means?

If we use k-means in a dataset where k is equal to the number of points in the dataset, and each cluster is made out of only a point. Considering that we have given a distance method, we can classify ...
0
votes
2answers
72 views

Can we automatically chose k value in k-means algorithm?

Can we choose automatically the K value, trying every possible values (k=1,.., n) where n is the number of instances to be clustered. We then keep the value of K for which we obtained the minimum ...
0
votes
1answer
491 views

how to compare between kmeans and hierarchical clustering results

I am using 2 types of clustering algorithm I apply hierarchical clustering the K-means clustering using python sklearn library Now the results are a little bit different so how can I compare the ...
0
votes
1answer
403 views

How to interpret the sample_weight parameter in MiniBatchKMeans?

I am using scikit-learn MiniBatchKMeans to do text clustering. In the fit() function there is a parameter sample_weight described as follows: The weights for each ...
0
votes
0answers
31 views

k-means for customer review analysis

I have a dataset of amazon Alexa reviews and want to group negative and positive reviews in separate groups. Is k-means a good approach to it? The dataset is unlabeled so how will my model know which ...
2
votes
2answers
342 views

Differentiate between positive and negative clusters

I have applied k-means clustering on my dataset of Amazon Alexa reviews. ...
2
votes
1answer
136 views

Understanding and find the best eps value for DBSCAN

I'm trying to run the DBSCAN algorithm on this .csv. In the first part of my program I load it and plot the data inside it to check its distribution. This is the first part of the code: ...
1
vote
1answer
125 views

Visualising K-Means clusters for 3D data in R

I have an excel file that contains 485k rows x 3 columns of integer values. Sample data: ...
0
votes
1answer
72 views

K-means clustering to separate temperature vertical profiles

I have temperature measurements from weather stations in a mountainous region and I want to obtain a vertical profile from these data at any given time. In a simple case one can just plot all values ...
1
vote
1answer
77 views

How to cluster user historical data? [closed]

I have transactional-level users data that includes their behaviour, such as reading articles, searching for content, posting, etc. I would like to cluster (most probably K-Means) these users based on ...
2
votes
1answer
73 views

Can we combine multiple K-Means Models as a single model?

I have a NLP problem statement where I use a Word2Vec embedding pre-trained model to convert key text to vectors and then on a set of terms run k-means clustering to get a final model for certain <...
1
vote
1answer
189 views

K-Prototype for anomaly detection

I have logs of the form (e.g. from a gym login).. the representational case is so: UserName, Login time, timeSpend_on_weights, time_spent_on_elliptical ...
1
vote
0answers
43 views

Why kmeans cluster breakup is like this [closed]

I have a galaxy spectrum data set (total 22000). Similar to an electronic wave data, two dimensional (Flux vs Wavelength). A typical set of wavelength plot looks like below Now I am doing kmeans on ...
1
vote
0answers
17 views

How to get a KNN model (using quantiles to scale variables due to non-normal distributed data) to be better suited for non-extreme values in the data?

I want to cluster my data via k-means/modes. As the variables in my data are not normal distributed, I am not using the z-transformation to scale my data. I am scaling my data by categorizing each ...
2
votes
2answers
128 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 ...
1
vote
1answer
22 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
1answer
40 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 ...
0
votes
1answer
97 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-...
0
votes
1answer
50 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
1answer
103 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 ...
2
votes
1answer
51 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
41 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 ...
1
vote
1answer
87 views

Clustering for Categorical Data? [duplicate]

How exactly does k-means clustering for categorical data work? I have a dataset which has several categorical features that can have 2,3,4,..,n values. I could one hot encode them, but I'm not sure if ...
2
votes
2answers
39 views

Is it accurate to say that "K-means clustering the vectors based on keywords weight similarity"?

Long story short, I have 200 vectors as a result of TF-IDF (Term Frequency - Inverse Document Frequency) on thousands of keywords in hundreds of vectors. The total number of unique keywords that I got ...
2
votes
1answer
100 views

max_iter hyper parameter in sklearn.cluster.MiniBatchKMeans

What is the significance of max_iter in sklearn.cluster.MiniBatchKMeans? Is this the maximum number of times partial_fit() can be executed on batches of data?
1
vote
1answer
172 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 ...
2
votes
1answer
4k 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 ...
0
votes
3answers
53 views

What kind of clustering would work better on such data? Would k-means work on such data?

I have a dataset where datapoints are more or less spread like this: What if I want to split the data in 2 data clusters, what would be a good choice? Would k-means work here? Thanks.
5
votes
2answers
1k views

The impact of using different scaling strategy with Clustering

I'm currently learning about clustering. To practice clustering, I am using this dataset. After running K-means clustering for multiple values of k and plotting the results, I can see that scaling is ...
0
votes
1answer
40 views

Algorithm query for bank customer segmentation

I've been using k-means clustering for bank customer segmentation up until now and I'm looking to explore other clustering algorithms in the banking domain. Is it a good idea to use affinity ...

1
2
3 4 5
9