The dataset consists of

1) a set of objects and

2) a set of labels, which are used to describe the objects.

For the moment, for simplicity sake, each label can be marked as either true or false (In a more complex setup, each label will have a value of 1-10).

But, not all the labels are actually applied to all the objects (in principle, all the labels can and should be applied across all the objects, but in practice, they just are not). Also, when a label isn't applied to an object, one cannot simply assume that the label's value for that particular is false. Therefore, the missing labels will be ignored in the model.

I need to cluster the objects based on their labels.

Any tips on how and what algorithms to use will be appreciated.

  • 1
    $\begingroup$ First you need to decide whether you want to do clustering (ignore the labels?) or classification (predict missing labels). $\endgroup$ Mar 31, 2019 at 7:13
  • $\begingroup$ Ignore the missing labels. Wrongly predicted missing labels can mess things up. $\endgroup$
    – ahron
    Mar 31, 2019 at 7:42
  • 1
    $\begingroup$ That sounds pretty much like the standard setup of recommender systems? $\endgroup$ Mar 31, 2019 at 10:40
  • $\begingroup$ Ok, maybe... At first look, the crux to any sort of clustering in a recommendation system is to be able to define a "distance" metric between arbitrary points (objects). For each point/object, I have a set {L1, L2, ... Ln} where Ln can be 0 or 1, or na. So now how do I invent this "distance" metric in a consistent/coherent way? Should that be another question? Sorry, I'm yet to figure out what's a trivial question and what's a serious question in the datascience business. $\endgroup$
    – ahron
    Mar 31, 2019 at 15:57
  • 1
    $\begingroup$ Consider each label to be a user! $\endgroup$ Apr 1, 2019 at 5:42

1 Answer 1


It is possible to cluster the objects based on their labels by treating the labels as features. Typically, labels are treated as targets which would frame the problem a supervised machine learning problem.

Since labels are nominal valued, you will need to use an appropriate distance metric. Jaccard index is one option.


Your Answer

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

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