Questions tagged [k-means]

k-means is a method to partition data into clusters by finding a specified number of means, k, s.t. when data are assigned to clusters w/ the nearest mean, the w/i cluster sum of squares is minimized

Filter by
Sorted by
Tagged with
0 votes
0 answers
10 views

What is normalized winning frequency in kernel self organizing map(SOM)?

In the k-means based kernel SOM, proposed by MacDonald and Fyfe (2000), the update of the mean is based on a soft learning algorithm mi(t + 1) = mi(t) + Λ[φ(x) − mi(t)] where Λ is the normalized ...
Anshuman Jayaprakash's user avatar
0 votes
0 answers
29 views

Why does this K-Means cluster example show 'overlap' between clusters?

I was reading the hypertools docs and came across this pictorial that shows 10 clusters (some seem to share very similar coloring) generated from some (mushroom) ...
Vincent Karuri's user avatar
1 vote
0 answers
55 views

K-means clustering - weird PCA visualization

I performed PCA on 4 variables and are shown in this visualization: At first look it doesn't look convincing and the some clusters seem weird. The data was cleaned and standardized beforehand. Only ...
Simon's user avatar
  • 11
0 votes
1 answer
16 views

K means clustering of image with k=1 vs mean of all pixels

I have relatively uniformly colored images and I extracted colors using k-means. k means 1 showed the best results for my modeling purposes, k means 2 not so much, and with k-means 3 there ceased to ...
phil27's user avatar
  • 1
0 votes
0 answers
21 views

Method for pairwise ordering two datasets

Given two rather small but unordered multidimensional vectors/datasets (e.g sets of a handful of 3D coordinates), what is a simple method for pairwise alignment/ordering? I've though about using ...
joaocandre's user avatar
0 votes
0 answers
31 views

Elbow method not giving a proper curve in python code

I am trying to determine how many clusters to use for my k-means clustering using different methods. first i used the following code to calculate different metrics per cluster number and different ...
rebwar's user avatar
  • 1
3 votes
2 answers
236 views

Termination conditions for K-means and their interconnection

As far as I know, there are two termination criteria for K-means clustering algorithm: assignments of data points do not change centroids do not change I wonder if there is any kind of relation ...
Artem Tartakovskiy's user avatar
1 vote
1 answer
36 views

Mathematics behind standardizing the data points in machine learning algorithms (e.g., K-means clustering)

For K-means algorithm, among other methods using distance-based measurements to determine similarity between data points, why we have to standardize the data points with mean as 0 and standard ...
Sophia's user avatar
  • 121
0 votes
1 answer
29 views

Continuous monitoring of KMeans model post production

In the process of deploying a KMeans model for a customer segmentation use case into production. KMeans doesn’t produce the same results every time and after production cluster sizes and arrangements ...
ibarbo's user avatar
  • 65
0 votes
1 answer
37 views

Proving that K-means corresponds to an EM algorithm?

Just wanted to make sure that my proof is correct and that I am not missing anything in the process. Any thoughts? " To demonstrate mathematically that the K-means algorithm corresponds to an ...
Naomi Pomella's user avatar
1 vote
1 answer
32 views

Can I use kmeans on paired data?

I want to see if a treatment brings patients closer to controls using multiple dependent variables. Can I do kmeans and see if the controls are separate from the patients before treatment, but cluster ...
maglorismyspiritanimal's user avatar
0 votes
0 answers
3 views

Loan Data: Bucket recoveries 1-D array

Some context: When someone defaults on their loan, we keep track of the recoveries as a percentage of the exposure (loan amount), we have a limited time T (legally) to collect recoveries, those ...
FaresDjerourou's user avatar
0 votes
0 answers
32 views

How would you interpret a jagged continually increasing silhouette plot for k-means cluster analysis?

I am running a k-means cluster analysis of textual data (k = 750) and the following is the plot of the silhouette score by cluster I am trying to decide optimal k and I'm wondering how one would ...
osckt's user avatar
  • 31
4 votes
2 answers
318 views

Question about Silhouette index calculation using scikit

I am currently working with continuous data measured from different sensors (thermometers and voltmeters). I have a matrix whose columns represent the sensors and the rows are normalized measurements (...
slow_learner's user avatar
0 votes
0 answers
10 views

Which method should be used if I want to find relations between two variables

Assume that you have a matrix $X \in \Re^{M x N}$ that have $M$ rows and $N$ columns. The rows $M$ can vary in length, but the $N$ columns remains constant. Each row is labeled with a class ID. The ...
euraad's user avatar
  • 415
0 votes
0 answers
7 views

Should main effects and interaction terms be included in Kmeans clustering? (hierarchical principle in clustering analysis)

Let's say I'm trying to cluster observations based on five features, including: n_emps: Number of employees n_cust: Number of ...
Arturo Sbr's user avatar
0 votes
0 answers
10 views

Assessment of Geospatial Analysis and Poisson GLM Modeling for Accident Frequency with Cluster-Based Features

I have a serious doubt about the quality of this approach: Firstly, a geospatial analysis was conducted using accident frequency and wind speed data to segment the map of a country into clusters using ...
aelyus's user avatar
  • 1
0 votes
0 answers
29 views

Turning heatmap into clusters - Classification

Assume that you having a heatmap that looks like this. The goal is to classify all the "dot" inside the image. How can that be done? The assumptions of the image: The image has always black ...
euraad's user avatar
  • 415
0 votes
0 answers
15 views

Criteria for a Distance Metric to be Compatible with K-means Clustering

Referring to this post, it's mentioned that K-means clustering doesn't inherently rely on the pairwise distances between data points, and not every distance metric is suitable for k-means clustering. ...
Peyman's user avatar
  • 309
0 votes
1 answer
25 views

In unsupervised learning, is a result of 2 clusters meaningful?

I used both agglomerative clustering and k-means on a dataset and see the results below. Result from agglomerative clustering was demonstrated with silhouette score while kmeans with inertia score. ...
LCheng's user avatar
  • 189
1 vote
0 answers
16 views

Method to find group associated with a target variable [closed]

The business question that I am trying to answer is: what group(s) of people have the highest chance of default? The features that I have are income, debt to income ratio, fico, etc. How do I find the ...
Victoria B's user avatar
0 votes
0 answers
14 views

Would it be wise to feed k-means results into a cmeans?

I am conducting a cluster analysis of documents using document embeddings as the input to the algorithms. One of the problems I am coming across is that in reality there are documents that belong to ...
osckt's user avatar
  • 31
1 vote
1 answer
36 views

How to tell whether segments from K Means clustering result are "successful" and will impact business metrics?

Background I'm a data analyst. The Business unit I'm assigned for needs to segment users based on power vs non-power users so they can target each segment with proper treatments. Goal Segment users (...
Blaze Tama's user avatar
0 votes
1 answer
115 views

Dummy Variable Trap in KMeans Clustering

My data set is having a column Gender, so I have to apply One Hot Encodingto perform KMeans Clustering. Q1. Should I take care about ...
mainak mukherjee's user avatar
2 votes
1 answer
130 views

Clustering algorithms puts data points that are visually far apart in same cluster

I am trying to cluster a very large set of data points, of roughly (20000, 100) shape. I could not run density based DBSCAN or SpectralClustering due to the ...
pingo's user avatar
  • 29
1 vote
2 answers
157 views

Interpreting results of K-means after PCA

I have this dataset about an airline company customers with 22 explanatory variables. My goal is to perform some sort of customer segmentation with the k-means algorithm. One problem that I've found ...
ScarceChicken's user avatar
0 votes
0 answers
63 views

General technique for loss function minimization

I was trying to rationalize the K-Means algorithm and came up with the following thoughts. Suppose we need to compute: $T=min_x L(x)$ but we struggle because $L$ is complex. Suppose we find $L'$ s.t.: ...
Thomas's user avatar
  • 870
0 votes
0 answers
20 views

Finding patterns of volume worked - Productivity Mix Correlation

I am trying to generate labor standards (the amount of productivity per hour an employee should be accomplishing) based off of historical data volumes. I do not have the start and end time that a ...
racurry1993's user avatar
0 votes
0 answers
64 views

How to cluster multivariate time series on different datasets?

I have following issue: I am trying to cluster similar countries with respect to different temporal features. Therefore, I have twelve different datasets each representing a different country. Each ...
sapphire's user avatar
1 vote
1 answer
709 views

Elbow method Vs Gap statistics, which one? challenging for data scientist

I am working on hourly-weather data. It contains four features: rain, wind speed, humidity, and temperature. Obviously, all of them are continuous values. The number of records is around 17000. Other ...
Asa Ya's user avatar
  • 73
0 votes
0 answers
20 views

convergence rate for algorithms that stop in finite steps

I know that the k-means algorithm converges in finite steps, see Proof of convergence of k-means. This result implies that the algorithm converges in finite steps. The general definition of the rate ...
StatLearner's user avatar
1 vote
2 answers
54 views

Can I use K-Means to group customers based on a single variable?

I have a test dataset of 11m records. The dataset contains a global customer id and spend figure. I need to group customers into the following categories: 0 Low 1 Low/Med 2 Med 3 Med/High 4 High I ...
John Edwards's user avatar
0 votes
0 answers
54 views

How to identify the clusters in SSE plot?

How to determine the number of clusters from the following plot?
Niro's user avatar
  • 1
1 vote
1 answer
171 views

Unsupervised learning: How to identify differences between clusters?

I'm learning about unsupervised learning and I tried to use KMeans, AgglomerativeClustering and DBSCAN on the same datase. The result was ok, they seems to work fine according silhouette_score() ...
Antonio Caipora's user avatar
2 votes
0 answers
35 views

Does it make sense to transform a feature containing hours (24h) into two features with xy-coordinates of each hour in the space? [duplicate]

I have a clustering problem that I might solve with an algorithm based on Euclidean distance (e.g. K-Means). One potential feature is the "hour" at which each user began an interaction. As ...
rusiano's user avatar
  • 514
0 votes
0 answers
14 views

How do I choose k for k means clustering [duplicate]

Given a set of points, I'm trying to find the right cluster. However, I am lost on what the process is. Here is the graph of all possible points. I am unsure what I should look at
user avatar
2 votes
1 answer
273 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 ...
Anna's user avatar
  • 61
0 votes
0 answers
31 views

How to interpret the Scatter Plot result from PCA? [duplicate]

I have a project in school about clustering analysis. I have applied standardization and principal component analysis (PCA) to my dataset (I used K-means), which is about heart disease patients. I ...
AK6000W's user avatar
1 vote
1 answer
113 views

In $k$-means, how is it NP-hard if the dimensionality of the data is at least $2$ ($d\geq 2$)?

In $k$-means, how is it NP-hard if the dimensionality of the data is at least $2$ ($d\geq 2$)? Can someone justify or give reasons to this statement? Any guidance would be appreciated.
Maryam Faheem's user avatar
0 votes
0 answers
18 views

K-means on linearly projected features

I am looking for references on K-Means applied to linearly projected features instead of to the original features, in the sense that both K-Means and the projection matrix are learned at the same time....
f10w's user avatar
  • 213
1 vote
0 answers
37 views

Can K-means put most of the noise in the same cluster?

I am working on clustering text data (very short sentences) vectorized with tf-idf. The data are characterized by high sparseness and the presence of abundant noise (considered here as documents that ...
zurgo's user avatar
  • 11
2 votes
0 answers
48 views

How can I ensure both levels of a binary variable are represented in every cluster?

Let's say I have some continuous variables and a binary treatment indicator. I want to cluster my observations based on the variables while ensuring that each cluster contains at least one member of ...
Noah's user avatar
  • 32.8k
2 votes
0 answers
281 views

How does this prove that the objective function in K-means clustering never increases?

I am reading the ISLR textbook (pg. 518-519, 12.4) and having trouble understanding why K-means clustering never increases. I can understand it conceptually but I don't understand the mathematical ...
idkmath28's user avatar
2 votes
2 answers
806 views

Time series clustering on large data

I am trying to do K-means clustering on my data which has time series length of 3700 and for (latitude,longitude) points of around 6000 in length. However, timeseries clustering using tslearn package ...
Vinayak Huggannavar's user avatar
0 votes
0 answers
191 views

SPSS: how to calculate nearest neighbor from k-means centroids

the subject of my problem is related to cluster analysis. Specifically, with SPSS I am conducting a cross-validation procedure based on splitting the sample data into two independent halves (subsample ...
Ric87's user avatar
  • 51
0 votes
1 answer
227 views

Can the loss of KMeans increase?

Let's say we have a dataset, and we run KMeans with k clusters. Is it possible that during the execution of KMeans the loss first decreases and than increases until ...
holo gram's user avatar
2 votes
0 answers
104 views

Normalization/standardization impact on T-SNE and K-means

I have a dataset of 20K samples on 27 features that I am trying to cluster with k-means. The dataset is in its majority rather sparse, i.e. 98% of samples have a single nonzero value in one of its ...
Seifbb's user avatar
  • 21
2 votes
1 answer
80 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 ...
Marguerite's user avatar
2 votes
2 answers
2k views

Implementing cross-validation to tune the hyperparameters of an unsupervised model

I have extensively researched the application of cross validation for unsupervised learning (as it is a requirement by my project manager) but it seems that there is no clear consensus as to how to ...
Octave's user avatar
  • 35
1 vote
1 answer
141 views

If I convert continuous data into ordinal discrete data, but number of the class is 100(1 class per 1 percentile), can I say this is 'continuous'?

I have some continuous data, and want to do kmeans clustering with this. But weirdly when I did kmean clustering with this data, the outcome was very conflicted with my presumption. So I decided to do ...
hogu's user avatar
  • 23

1
2 3 4 5
21