Questions tagged [clustering]

Cluster analysis or clustering is the task of grouping a set of objects in such a way that objects in the same group (called a cluster) are more similar (in some sense or another) to each other than to those in other groups (clusters). It is a main task of exploratory data mining, and a common technique for statistical data analysis, used in many fields, including machine learning, pattern recognition, image analysis, information retrieval etc.

Filter by
Sorted by
Tagged with
202 votes
13 answers
307k 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 ...
IgorS's user avatar
  • 5,474
67 votes
9 answers
105k 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: ...
rokpoto.com's user avatar
46 votes
6 answers
113k views

Calculating KL Divergence in Python

I am rather new to this and can't say I have a complete understanding of the theoretical concepts behind this. I am trying to calculate the KL Divergence between several lists of points in Python. I ...
Nanda's user avatar
  • 773
40 votes
5 answers
66k views

Is it necessary to standardize your data before clustering?

Is it necessary to standardize your data before cluster? In the example from scikit learn about DBSCAN, here they do this in the line: ...
makansij's user avatar
  • 849
35 votes
1 answer
71k views

What is the best Keras model for multi-class classification?

I am working on research, where need to classify one of three event WINNER=(win, draw, lose) ...
SpanishBoy's user avatar
34 votes
4 answers
38k views

When to use cosine simlarity over Euclidean similarity

In NLP, people tend to use cosine similarity to measure document/text distances. I want to hear what do people think of the following two scenarios, which to pick, cosine similarity or Euclidean? ...
Logan's user avatar
  • 463
33 votes
8 answers
61k views

Best practical algorithm for sentence similarity

I have two sentences, S1 and S2, both which have a word count (usually) below 15. What are the most practically useful and successful (machine learning) algorithms, which are possibly easy to ...
DaveTheAl's user avatar
  • 503
29 votes
1 answer
37k views

Word2Vec vs. Sentence2Vec vs. Doc2Vec

I recently came across the terms Word2Vec, Sentence2Vec and Doc2Vec and kind of confused as I am new to vector semantics. Can someone please elaborate the differences in these methods in simple words. ...
Smith's user avatar
  • 529
27 votes
2 answers
12k views

How to deal with time series which change in seasonality or other patterns?

Background I'm working on a time series data set of energy meter readings. The length of the series varies by meter - for some I have several years, others only a few months, etc. Many display ...
Jo Douglass's user avatar
25 votes
5 answers
10k views

Clustering based on similarity scores

Assume that we have a set of elements E and a similarity (not distance) function sim(ei, ej) between two elements ei,ej ∈ E. How could we (efficiently) cluster the elements of E, using sim? k-means,...
vefthym's user avatar
  • 503
25 votes
3 answers
19k views

K-means incoherent behaviour choosing K with Elbow method, BIC, variance explained and silhouette

I'm trying to cluster some vectors with 90 features with K-means. Since this algorithm asks me the number of clusters, I want to validate my choice with some nice math. I expect to have from 8 to 10 ...
marcodena's user avatar
  • 1,667
20 votes
4 answers
23k 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 ...
ngub05's user avatar
  • 333
18 votes
2 answers
11k views

K-means vs. online K-means

K-means is a well known algorithm for clustering, but there is also an online variation of such algorithm (online K-means). What are the pros and cons of these approaches, and when should each be ...
Rubens's user avatar
  • 4,107
17 votes
1 answer
12k views

Algorithms for text clustering

I have a problem of clustering huge amount of sentences into groups by their meanings. This is similar to a problem when you have lots of sentences and want to group them by their meanings. What ...
Maxim Galushka's user avatar
15 votes
2 answers
3k views

Clustering unique visitors by useragent, ip, session_id

Given website access data in the form session_id, ip, user_agent, and optionally timestamp, following the conditions below, how would you best cluster the sessions ...
AdrianBR's user avatar
  • 367
15 votes
2 answers
11k views

Using attributes to classify/cluster user profiles

I have a dataset of users purchasing products from a website. The attributes I have are user id, region(state) of the user, the categories id of product, keywords id of product, keywords id of ...
sylvia's user avatar
  • 303
14 votes
2 answers
3k views

Fast k-means like algorithm for $10^{10}$ points?

I am looking to do k-means clustering on a set of 10-dimensional points. The catch: there are $10^{10}$ points. I am looking for just the center and size of the largest clusters (let's say 10 to 100 ...
Alex I's user avatar
  • 3,152
14 votes
1 answer
313 views

Recognize a grammar in a sequence of fuzzy tokens

I have text documents which contain mainly lists of Items. Each Item is a group of several token from different types: FirstName, LastName, BirthDate, PhoneNumber, City, Occupation, etc. A token is a ...
OoDeLally's user avatar
  • 241
13 votes
2 answers
92k views

Perform k-means clustering over multiple columns

I am trying to perform k-means clustering on multiple columns. My data set is composed of 4 numerical columns and 1 categorical column. I already researched previous questions but the answers are not ...
Lola's user avatar
  • 141
13 votes
5 answers
46k views

Clustering with cosine similarity

I have a large data set and a cosine similarity between them. I would like to cluster them using cosine similarity that puts similar objects together without needing to specify beforehand the number ...
Smith Volka's user avatar
13 votes
3 answers
22k views

How can autoencoders be used for clustering?

Suppose I have a set of time-domain signals with absolutely no labels. I want to cluster them in 2 or 3 classes. Autoencoders are unsupervised networks that learn to compress the inputs. So given an ...
Tendero's user avatar
  • 243
13 votes
1 answer
721 views

Classify Customers based on 2 features AND a Time series of events

I need help on what should be my next step in an algorithm I am designing. Due to NDAs, I can't disclose much, but I'll try to be generic and understandable. Basically, after several steps in the ...
JusefPol's user avatar
  • 131
12 votes
3 answers
2k views

Instances vs. cores when using EC2

Working on what could often be called "medium data" projects, I've been able to parallelize my code (mostly for modeling and prediction in Python) on a single system across anywhere from 4 to 32 cores....
Therriault's user avatar
12 votes
3 answers
3k views

Why use cosine similarity instead of scaling the vectors when calculating the similarity of vectors?

I'm watching a NLP video on Coursera. It's discussing how to calculate the similarity of two vectors. First it discusses calculating the Euclidean distance, then it discusses the cosine similarity. It ...
Allure's user avatar
  • 275
12 votes
3 answers
24k views

How to get the probability of belonging to clusters for k-means?

I need to get the probability for each point in my data set. The idea is to compute distance matrix (first column contsins distances to first cluster, second column conteins distances to second ...
Толкачёв Иван's user avatar
12 votes
2 answers
10k views

Clustering high dimensional data

TL;DR: Given a big image dataset (around 36 GiB of raw pixels) of unlabeled data, how can I cluster the images (based on the pixel values) without knowing the number of clusters ...
sunside's user avatar
  • 223
12 votes
1 answer
8k views

What is the difference between topic modeling and clustering?

I know that topic modeling and clustering are related, but not similar techniques. Can anyone suggest what are the main differences?
sara's user avatar
  • 481
12 votes
6 answers
7k views

Is it possible to cluster data according to a target?

I was wondering if there exists techniques to cluster data according to a target. For example, suppose we want to find groups of customers likely to churn: Target is churn. We want to find clusters ...
Tanguy's user avatar
  • 270
12 votes
1 answer
2k views

MinHashing vs SimHashing

Suppose I have five sets I'd like to cluster. I understand that the SimHashing technique described here: https://moultano.wordpress.com/2010/01/21/simple-simhashing-3kbzhsxyg4467-6/ could yield ...
cjauvin's user avatar
  • 451
12 votes
1 answer
728 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 ...
Kuba_'s user avatar
  • 264
11 votes
4 answers
28k views

Clustering for mixed numeric and nominal discrete data

My data includes survey responses that are binary (numeric) and nominal / categorical. All responses are discrete and at individual level. Data is of shape (n=7219, p=105). Couple things: I am ...
kms's user avatar
  • 310
11 votes
4 answers
504 views

Using Clustering in text processing

Hi this is my first question in the Data Science stack. I want to create an algorithm for text classification. Suppose i have a large set of text and articles. Lets say around 5000 plain texts. I ...
Rashid's user avatar
  • 213
11 votes
1 answer
21k views

Knn distance plot for determining eps of DBSCAN

I would like to use the knn distance plot to be able to figure out which eps value should I choose for the DBSCAN algorithm. Based on this page: The idea is to calculate, the average of the ...
Marc Lamberti's user avatar
11 votes
1 answer
323 views

Solutions for Continuous Online Cluster Identification?

Let me show you an example of a hypothetical online clustering application: At time n points 1,2,3,4 are allocated to the blue cluster A and points b,5,6,7 are allocated to the red cluster B. At ...
Raffael's user avatar
  • 211
10 votes
1 answer
64k views

Confused about how to apply KMeans on my a dataset with features extracted

I am trying to apply a basic use of the scikitlearn KMeans Clustering package, to create different clusters that I could use to identify a certain activity. For example, in my dataset below, I have ...
Gary's user avatar
  • 529
10 votes
3 answers
4k views

Log file analysis: extracting information part from value part

I'm trying to build a data set on several log files of one of our products. The different log files have their own layout and own content; I successfully grouped them together, only one step ...
Michael Hooreman's user avatar
10 votes
3 answers
15k views

Clustering of documents using the topics derived from Latent Dirichlet Allocation

I want to use Latent Dirichlet Allocation for a project and I am using Python with the gensim library. After finding the topics I would like to cluster the documents using an algorithm such as k-means(...
Swan87's user avatar
  • 221
10 votes
1 answer
2k views

Clustering customer data stored in ElasticSearch

I have a bunch of customer profiles stored in a elasticsearch cluster. These profiles are now used for creation of target groups for our email subscriptions. Target groups are now formed manually ...
Konstantin V. Salikhov's user avatar
10 votes
3 answers
22k views

Multivariate Time-Series Clustering

I have a streaming data along with timestamp dataset that looks like this: 1.png Timestamp can be inclusive of "seconds" too, but the data may or may not change every second. it depends on ...
Abhinaya Krishna's user avatar
10 votes
1 answer
185 views

Robustness of ML Model in question

While trying to emulate a ML model similar to the one described in this paper, I seemed to eventually get good clustering results on some sample data after a bit of tweaking. By "good" results, I mean ...
Alerra's user avatar
  • 201
10 votes
1 answer
4k views

Convergence in Hartigan-Wong k-means method and other algorithms

I have been trying to understand the different k-means clustering algorithms mainly that are implemented in the stats package of the ...
Sid's user avatar
  • 101
10 votes
1 answer
286 views

Is Minimax Linkage a Lance-Williams hierarchical clustering?

I found the following article on "Hierarchical Clustering With Prototypes via Minimax Linkage". It is stated in Property 6 that Minimax linkage cannot be written using Lance–Williams updates. A ...
mic's user avatar
  • 513
9 votes
4 answers
3k views

Suggest text classifier training datasets

Which freely available datasets can I use to train a text classifier? We are trying to enhance our users engagement by recommending the most related content for him, so we thought If we classified ...
Abdelmawla's user avatar
9 votes
3 answers
5k views

Human activity recognition using smartphone data set problem

I'm new to this community and hopefully my question will well fit in here. As part of my undergraduate data analytics course I have choose to do the project on human activity recognition using ...
Jakubee's user avatar
  • 401
9 votes
3 answers
17k views

Why do we use a Gaussian kernel as a similarity metric?

In graph-based clustering, why is it preferred to use the Gaussian kernel rather than the distance between two points as the similarity metric?
zfb's user avatar
  • 91
9 votes
1 answer
12k views

What is the difference between affinity matrix eigenvectors and graph Laplacian eigenvectors in the context of spectral clustering?

In spectral clustering, it's standard practice to solve the eigenvector problem $$L v = \lambda v$$ where $L$ is the graph Laplacian, $v$ is the eigenvector related to eigenvalue $\lambda$. My ...
felipeduque's user avatar
8 votes
1 answer
8k views

K-means clustering of word embedding gives strange results

I'm trying to cluster words based on pre trained embeddings. I ran a simple experiment where I obtained around 100 words relating to "food taste", obtained word embeddings from a pre-trained set, and ...
Thusitha's user avatar
  • 111
8 votes
4 answers
4k views

How evaluate text clustering?

What metrics can be used for evaluating text clustering models? I used tf-idf + k-means, ...
Толкачёв Иван's user avatar
8 votes
3 answers
2k views

Algorithm for segmentation of sequence data

I have a large sequence of vectors of length N. I need some unsupervised learning algorithm to divide these vectors into M segments. For example: K-means is not suitable, because it puts similar ...
generall's user avatar
  • 273
8 votes
1 answer
7k views

Gaussian Mixture Models as a classifier?

I'm learning the GMM clustering algorithm. I don't understand how it can used as a classifier. Here are my thought: 1) GMM is an unsupervised ML algorithm. At least that's how ...
F.S.'s user avatar
  • 183

1
2 3 4 5
28