1
$\begingroup$

I have a large labeled dataset with 29 classes. Is is possible to use a clustering algorithm (like k-means) in this dataset, or it's not possible since clustering algorithms are unsupervised ?

$\endgroup$
  • $\begingroup$ what do you mean by classes? Is it categorical data for you have 29 columns. $\endgroup$ – Arpit Sisodia May 22 '18 at 11:49
1
$\begingroup$

You can do many things:

  • Forget about the labels: just use the features that are not labels and cluster along those features using the k-means algorithm (or another).
  • Forget about the features: this is the dummiest way of clustering. Cluster the data in 29 clusters according to the labels that they have. If you want less clusters, you can compute the centroids of the classes and use them to join clusters of different labels.
  • Use everything: create a categorical variable refering to the class that every example belongs to. Then, with this new variable and all the features perform a classical clustering algorithm.

The way to proceed depends on if you want to use the labels or not, and how much importance you want them to have.

$\endgroup$
  • $\begingroup$ So the first point is about discovering patterns in the dataset. But what kind of patterns for example? And the second point is about aggregating pre-existing classes into new classes. Am i correct ? $\endgroup$ – Qwerto May 22 '18 at 9:42
  • 1
    $\begingroup$ Second point: right. First point is to discover the clusters that arise when not thinking about the labels, to find patters on the features themselves. It discovers the patterns that clustering usually discovers: that is, how are features distributed in different connected components. $\endgroup$ – David Masip May 22 '18 at 9:48
  • $\begingroup$ So isnt directly connected to classification ? $\endgroup$ – Qwerto May 22 '18 at 9:49
  • 1
    $\begingroup$ Perhaps, or perhaps not. If your data is linearly separable, probably your clusters will look like the labels. If not, then the clusters see some things and the labels others. $\endgroup$ – David Masip May 22 '18 at 9:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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