0

I am working on a multi-label classification. I used GaussianNB function on python scikit-learn. The target is an array with (N, L) shape, where L is the number of classes and N is the number of observations.

I used three ways to deal with multi-label case:

  1. binary relevance
  2. chain model
  3. label powerset

I have a prior distribution for L classes, which is an array of (L,) shape. I tried to incorporate this prior distribution into GaussianNB through priors parameter like this

classifier = BinaryRelevance(GaussianNB(priors = prior_dist))

However, it returns the following error

ValueErrors: number of priors must match number of classes

What is the correct way to specify priors into GaussianNB in a multi-label case?

niedakh
  • 2,819
  • 2
  • 20
  • 19
ycenycute
  • 688
  • 4
  • 10
  • 20

1 Answers1

0

I haven't added support for this yet in scikit-multilearn, but it seems fairly easy to add - could you put it as a feature request in scikit-multilearn? I think I have an idea how to add this, but we can track the issue further in github.

niedakh
  • 2,819
  • 2
  • 20
  • 19