A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

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
2
votes
2answers
31 views

Is k-means with Mahalanobis a valid option for clustering?

I want more info into if k-means with Mahalanobis distance is a mathematically/methodologically correct option for datasets with different variance clusters. The steps are: Create aggregate datasets (...
1
vote
1answer
27 views

Using TSNE to Visualize Clusters in Python

I'm using TSNE to visualize my clusters but the output seems a bit strange. There are supposed to be 3 clusters but instead, there are 4 lines. Is there something wrong with how I'm visualizing them ...
4
votes
0answers
27 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 ...
2
votes
1answer
21 views

How to retrain a K-Modes model based on daily data?

I have read that retraining a model depends highly on what you are trying to achieve. I am conscious that maybe I need to retrain my model daily and after a certain time I have to train the model ...
0
votes
0answers
26 views

Google Earth Pro Satellite image segmentation using clustering

I have downloaded a satellite image from Google Earth Pro software corresponding to a particular date for a selected area around a place. I want to specifically segment the road lanes from the image ...
2
votes
2answers
64 views

KMeans clustering for Image Data

I am trying to cluster the sample of Imagenet Dataset using K-Means clustering. In this approach, I have used the below 2 approaches to get the optimal number of clusters. Elbow method From the ...
1
vote
1answer
46 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 ...
0
votes
1answer
24 views

Incremental modelling of kmeans in pyspark

I have a large dataset and trained the model with kmeans for the first time. I saved the model and pipeline used . Now again I started collecting data. After sufficient data is collected using old ...
0
votes
1answer
27 views

PCA before Affinity Propagation (AP)

I have a large-ish dataset (100k samples, ~100 features), that I am trying to cluster, to an unknown number of clusters. I thought of using PCA first, to reduce dimensionality, since I understand that ...
0
votes
1answer
23 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 ...
0
votes
1answer
11 views

Topic models for non-textual data?

I am looking to employ an unsupervised clustering on a dataset where each observation has a mix of textual and non-textual features. For each observation, I combine the features into a single vector ...
1
vote
1answer
234 views

How to evaluate the K-Modes Clusters?

K-modes algorithm is available here I want to do clustering of my binary dataset. I need to specify the number of clusters that I need as an output: ...
3
votes
2answers
67 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
2answers
29 views

How can I improve the results of my clustering

I am working on a project with the idea to cluster the sound waves of key strokes on a computer. So far what I have done was recorded about 50 keystrokes per key (only have done 1 - 10 so far), found ...
0
votes
1answer
23 views

2nd, 3rd, Nth closest guesses

I have used the KMeans algorithm to create an engine that can guess the cluster that a particular set of input data will fall into. Can I use it to guess the 2nd closest cluster, 3rd closest, and so ...
2
votes
1answer
47 views

Evaluate clustering by using decision tree unsupervised learning

I am trying to evaluate some clustering results that a company did for some data but they used an evaluation method for clustering that i have never seen before. So i would like to ask your opinion ...
1
vote
1answer
65 views

will k-means clustering converge to the same results given the same data set?

I did some study on the k-means clustering algorithm. It seems that the only non-deterministic part is the centroid - initialization. Assume I have 10k data points, and a given k. I then initialize ...
1
vote
2answers
38 views

Clustering Small Text Descriptions

Im presented with a unique text classification problem. Im given a list of descriptions each containing 3-8 words. I know that there are some descriptions that are nearly the same, but the majority ...
0
votes
1answer
26 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, ...
0
votes
0answers
20 views

Clustering data using KMeans centroids of base period for pattern analysis

I have a data frame consisting of 12 months of Customer Transaction Level Data. The data is unsupervised. The data is divided into 6 sets of 2 months period each. Taking first period as the base, I am ...
0
votes
1answer
29 views

color compression using k-means algorithm

I am reading about k means algorithm at this link. At ln[22] here author mentioned that Input color space is 16 million possible colors. How author came up with 16 million number here. Kindly explain....
0
votes
2answers
27 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 ...
-1
votes
1answer
15 views

Efficient algorithm to find the lowest value cluster in a series of values

Let's say I have a list of numeric values that tend to be grouped into some number of clusters of values that are close to one another. I'm aware of things like k-means to group these into groups of ...
0
votes
0answers
17 views

How to find the feature/(data column) that separates each cluster of K-means?

I have a general question on applying k-means clustering on the datasets.. How to find the feature/(data column) that separates each cluster of K-means? may be using scikit-learn in python .. Best ...
0
votes
1answer
22 views

Why compressed image size is greater than original one in kmeans algorithm?

I have a png image as shown below. And I use kmeans algorithm to compress the image by color quantization. I compressed the ...
0
votes
1answer
13 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 ...
-1
votes
1answer
42 views

How to plot datasets 1 factors for K mean clustering python

I'm unable to plot the data for K mean clusering algo usingsklearn as it throws this error : TypeError: scatter() missing 1 required positional argument: 'y' Here is the function I have written to ...
-1
votes
1answer
51 views

Apply a clustering algorithm on categorical data with features of multiple values [duplicate]

Let us I have a people data like gender, age, marital status, education, employment, hobbies. I want to make clusters of those people, having some similarity/common among them (for example they have ...
0
votes
2answers
152 views

Question about Similarity vs Dissimilarity Matrix

Right now, I'm working on a coming up with a similarity vs dissimilarity matrix for a set of data points for a clustering algorithm. My question is, if I want to use one of the many clustering ...
0
votes
2answers
31 views

Question About Coming Up With Own Function for Distance Matrix (For Clustering)

Right now, I am currently working on implementing a clustering algorithm with millions data entries with regards to game users for a mobile game. A lot of the features I plan on using are unique to ...
2
votes
0answers
20 views

Using a KMeans to classify URLs: validate the number of cluster and visualise

I'm relatively new to the NLP and DataScience, so apologies for omission or things like this. I've been trying to use the KMeans to classify a list of 1000 of unique URLs containing several keywords ...
0
votes
0answers
66 views

How to plot k-means scatter plot on Standardize Data for 16 features in python? Is it even possible?

I have 16 features in my dataset:['age','job', 'marital', 'education', 'default','balance','housing','loan','contact','day','month','duration','campaign','pdays','previous','poutcome']. And result as :...
0
votes
1answer
18 views

Scaling of ordinal data before both hierarchical and KMeans clustering

I am new to data analytics. As part of my assignment I have to perform both hierarchical and Kmeans clustering on a data set wherein all applicable variables are ordinal (1-5 rating scale). Do I need ...
0
votes
1answer
32 views

trade offs between number of features with its score

I am running k-mean clustering on ~200000 samples. The dataset has in total 14 features. One feature is id and the rest are categorical. I have been playing with ...
0
votes
1answer
48 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 ...
0
votes
3answers
72 views

Applying and Visualizing k means clustering on a data set that has 9 features

I had a data set of images that I have extracted 9 numerical features that I want to apply k means clustering or hierarchical clustering to. I'm just not sure how to go about it. The tutorials I have ...
6
votes
2answers
81 views

How to compare different similarity measurements in text clustering?

I have a dataset which contains vectors generated from subtitles (each column represents a genre, each row is a movie name), my purpose is to find the most similar movie titles, I want to use ...
0
votes
0answers
1k views

Anomaly detection using k-means clustering in Python

I'm working on an anomaly detection task in Python. Datasets regard a collection of time series coming from a sensor, so data are timestamps and the relative values. In order to find anomalies, I'm ...
2
votes
1answer
21 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. ...
0
votes
3answers
36 views

If I have to recommend 10 movies to the users

Let's say I have some information about a user and movie data similar to the following: ...
2
votes
2answers
53 views

Is there a real life meaning about KMeans error?

I am trying to understand the meaning of error in sklearn KMeans. In the context of house pricing prediction, the error linear regression could be considered as the money difference per square foot. ...
0
votes
1answer
49 views

Can Anyone Explain this code piece by piece? [closed]

Function that creates a DataFrame with a column for Cluster Number ...
1
vote
0answers
226 views

Scaling negative and positive variables when performing a k-means cluster analysis

I'm looking to perform a k-means cluster analysis on a set of data that contains variable ranges that contain both positive and negative values. Given the rangers vary so much the data will need to be ...
0
votes
3answers
52 views

good algorithm for outliers detection

I have 2 independent data sets (1. 300 rows and 2.3000 rows) with 6 months trades observations for 50 traders. In both datasets I have: trader id, stock title, buy/sell volume, date of trade, sector ...
0
votes
2answers
165 views

Would K-means be Appropriate to Use with Four or More Variables?

Just a general question that I'm trying to mentally visualize. I'm fairly new to using k-means clustering and have used it before on two variables, which creates a 2-D plot of points. I also know, ...
0
votes
3answers
54 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
16 views

Product Prediction to group of customers

I have multiple groups of customer, say for segment 1 as shown in the pictures, I have a list of products that I can choose the cross-sell to that group. Consider ...
0
votes
1answer
70 views

Stationary time series for clustering algorithms

I have a set of time series data that I would like to feed into a clustering algorithm (like k-means, using dynamic time warping as the distance function). After standardizing the data with mean 0 and ...
-1
votes
2answers
310 views

Anomaly detection k-means in Time Series

I'm trying to use k-means to detect anomalies in the Amount column. I have the following part of my dataset: ...
1
vote
2answers
124 views

Standardization After PCA for Kmean clustering

I want to apply Kmean for clustering after PCA dimensionality reduction. I have standardized data with StandardScaler before the PCA, then I want to train Kmeans for finding clusters. However, the ...