0
$\begingroup$

I have a dataset where datapoints are more or less spread like this:

Data

What if I want to split the data in 2 data clusters, what would be a good choice? Would k-means work here?

Thanks.

$\endgroup$

3 Answers 3

1
$\begingroup$

Theoretically, Gaussian Mixture Model could identify [\, /] clusters.

$\endgroup$
0
$\begingroup$

It comes down to experimentation and two things:

  1. The total observations on the dataset
  2. Do you know how many categories?

Sample size

  • [<20] "Brich" is good on a small scale.
  • [20,10k) Minibatch k-means, just to have a second option Hierarchical clustering.
  • [>10k] k-means or Spectral clustering.

Number of categories

If you don't know how many classes you have on your data and you're exploring this try with the "Mean Shift" model which will also need you to initialize the fitting process with a candidate centroid. Variational Gaussian Mixture models are stable and can help you to find the “ideal” number of classes but I would suggest finding the ideal number of classes with these methods:

  • Elbow method,
  • Average silhouette,
  • Gap statistic
$\endgroup$
3
  • $\begingroup$ At the momment I am trying to understand the k-means algorithm and its limitations or when can I use it. Visually I see two options to create two groups of data: a) one is almost horizontal and the other is diagonal; b) consider the left side of an X and the right of the X. Could k-means find these types of patterns? $\endgroup$
    – MyName
    Commented Jul 4, 2020 at 19:36
  • 1
    $\begingroup$ It's possible, depending on the behavior of the centroids after they are (randomly) initialized. You can create a data set and experiment with different types of centroid initialization. In my opinion, the best use case of Kmeans is to cluster into neighborhoods that you don't know in advance. Such as customer segmentation. $\endgroup$
    – Echo9k
    Commented Jul 4, 2020 at 19:53
  • $\begingroup$ How are they going to do logistic regression without a binary dependent variable? $\endgroup$
    – astel
    Commented Jul 4, 2020 at 23:33
0
$\begingroup$

K-means would fail on this task.

What you want is called Subspace clustering

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.