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
-1
votes
0answers
8 views

ConsensusClusterPlus not giving accurate results R

I am using ConsensusClusterPlus function in R, with k-means clustering. I am not getting accurate results at all and I am wondering if I'm doing something wrong. I have tried reducing the dimensions ...
0
votes
0answers
6 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 ...
-1
votes
1answer
18 views

K-means Clustering Question [closed]

Given Four points: P1 = (1, 1, 3), P2 = (1.5, 1, 3), P3 = (5, 4, 2), and P4 = (4, 6, 2). Create two clusters using K-Means clustering. You need to show your calculation. Constrain: Consider, seed of ...
2
votes
2answers
82 views

Differentiate between positive and negative clusters

I have applied k-means clustering on my dataset of Amazon Alexa reviews. ...
2
votes
1answer
57 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
votes
0answers
26 views

How to use k-means with non-numeric data

I am working on clustering algorithms, my data set contains those columns (exp: name_app=Facebook, starttime=12:10:2020 15:45:52). I want to apply k-means algorithm on this dataset, but I don't know ...
0
votes
0answers
9 views

How to approach Customer dimensions and work hours relation problem

I am thinking about how to solve the following problem related to a supermarket and its employees' workload prediction: I have customer dimensions (attributes): CustomerID Loyalty status Uses e-store ...
0
votes
0answers
10 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
21 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
38 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
26 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
49 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
14 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
111 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
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
1answer
22 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
48 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
38 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
36 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
34 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
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 ...
1
vote
1answer
42 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 ...
3
votes
2answers
28 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
29 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
30 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 ...
1
vote
1answer
41 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
47 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.
4
votes
2answers
88 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
21 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
votes
1answer
23 views

K-means clustering doesn't overlap with scaled dataset but overlaps heavily without scaled data

I'm working in my first data science internship (I'm first year student) and I'm having problems understanding data scaling and PCA. My task is to figure out the best way to classify buildings based ...
0
votes
0answers
15 views

Why KMeans.score() gives very high value?

I'm working on Udacity's Identify Customer segments project. My problem now is that after applying StandardScaler on the dataset after procedures of cleaning, I used PCA(n_components=36).fit_transform(...
0
votes
0answers
22 views

Best practices for avoiding spurious artifacts in image cluster detection / color quantization

I want to know whether there are some common best practices for unsupervised detection of clusters / colors in images, in order to avoid spurious artifacts. To understand what I mean by 'spurious', ...
1
vote
3answers
118 views

How to handle categorical features in K-means?

I am working on clustering algorithms. I am working with titanic dataset. It contains 6 categorical features. I used k-means algorithm on this dataset. I am using label encoding for categorical ...
0
votes
1answer
41 views

Multidimensional K-Means wiith sklearn, centroids problem when plotting

I am working with a dataset (X) to predict 12 clusters with K-Means using python SKLEARN library: ...
0
votes
1answer
35 views

K-means and LDA for text classification

I hope to explain in a clear way what I would like to do. I have more than 50000 tweets and I would like to add some labels on topics. So I have used LDA for doing this. I have also used k-means to ...
0
votes
2answers
34 views

k-means and LDA for text classification: how to test accuracy?

I have many tweets that I would like classify based on their similarity. Unfortunately I am not quite familiar with text-classification and nlp, so I had to read a lot of documents before having an ...
1
vote
1answer
138 views

Choosing attributes for k-means clustering

The k-means clustering tries to minimize the within-cluster scatter and maximizing the distances between clusters. It does so on all attributes. I am learning about this method on several datasets. To ...
-1
votes
1answer
23 views

How to explain the results from this kmeans?

I got the following results by using k-means algorithm. There are $10$ elements in Cluster $0$ and $3$ elements in Cluster $1$. Do you think it makes sense and it might be an acceptable result? How ...
0
votes
1answer
24 views

Clustering with k-means for text classification based on similarity

I have a column that contains all texts that I would like to cluster in order to find some patterns/similarity among each other. ...
2
votes
1answer
98 views

Clustering mixed data types - numeric, categorical, arrays, and text

I have a dataset with 4 types of data columns: ...
1
vote
1answer
37 views

How to get the probability/closeness of a sample belonging to a specific cluster?

I'm new to this so please let me know if my logic of comparing cosine similarity and k-means is incorrect I got a set of ...
0
votes
4answers
57 views

Clusters: how to improve results for text classification

I am trying to classify texts using kmeans, TfidfVectorizer, PCA. However, it seems that many texts are not correctly classified as you can see: I have texts in cluster2 that should be in Cluster 0 or ...
0
votes
0answers
14 views

How to plot the K-means and print the points outside the cluster

How to plot the K Means for the below data ...
0
votes
0answers
11 views

How to find the anomaly detection using K Means clustering by considering all labels

I have 3000 rows of data in excel, I am trying to find the anomaly detection using K Means clustering ...
0
votes
1answer
37 views

kMean clustering for recommendation

I have a file with 50000 rows from a library platform. Each individual row saves a user, and shows the order in which the user, has selected. The books could be from various categories (e.g. roman, ...
0
votes
0answers
20 views

Correct way to use k-means cluster- python-scikit-learn

I am working with Python, pandas and scikit-learn. I have a dataset where I have the number of sales per shop. I have the date and the hour of this sales and I want to forecast the sales for the next ...
0
votes
0answers
24 views

clustering more than optimal k and Overfitting in k-means

In my data by using elbow method. i got optimal k to be 3. but , i clustered them into 5 clusters.and the patterns in the cluster are as i wanted them . But, does using k more than optimal k decreases ...
1
vote
2answers
44 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
30 views

Should dimensionality reduction be done before k-means clustering if there are many features?

My data contains over 200 features and over 500 observations. I want to place the observations into a number of clusters based on the features that make them different. There are numerous ideas I ...

1
2 3 4 5
7