2
$\begingroup$

I have a dataset with a lot of binary categorical features and a single continuous target value. I would like to cluster them, but I am not quite sure what to use.

In the past, I have used DBSCAN for something similar and it worked well, but that dataset also had lots of continuous features.

Do you have any tips and suggestions?

Would you suggest matrix factorization and then cluster?

$\endgroup$
4
  • 1
    $\begingroup$ By "binary categorical (one-hot encoded)", do you mean that you have $n$ features, and, for each input, only one of them is $1$ and all the others are $0$? $\endgroup$
    – nbro
    May 15, 2022 at 15:59
  • $\begingroup$ @nbro thanks for the comment! No, I have n features and any combination of 0, 1s among them is possible. i.e. if n = 3, I may have, 000 or 010, or 111, etc. $\endgroup$
    – user199590
    May 15, 2022 at 16:02
  • 1
    $\begingroup$ Ok, then I don't think that's called one-hot encoded. 1-hot encoded is what I described, I think. $\endgroup$
    – nbro
    May 15, 2022 at 16:07
  • $\begingroup$ @nbro ah, apologies, I meant to convey that the individual features can only be either 0 or 1. I'll edit. $\endgroup$
    – user199590
    May 15, 2022 at 16:08

1 Answer 1

1
$\begingroup$

Any clustering algorithm should work -- the main issue is the similarity or distance metric that determines how similar (or different) two elements are. This is often something like Euclidean distance, but that won't work well with binary data.

I would suggest using the Jaccard Index or Dice Coefficient. These will be suitable for use as a metric when clustering such data.

$\endgroup$
1
  • $\begingroup$ Hey Oliver, thanks a lot! I'll try and experiment with using these distance metrics. $\endgroup$
    – user199590
    May 17, 2022 at 5:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .