Skip to content

Categorical Naive Bayes not available #10856

@FlorianWilhelm

Description

@FlorianWilhelm

Right now Scikit-Learn provides several Naive Bayes models.

  • GaussianNB: For continuous features that are assumed to be Gaussian distributed.
  • MultinomialNB: For discreet features that are multinomially distributed, e.g. counts of words of occurrences
  • BernoulliNB: For indicator features (True/False) which are assumed to be Bernoulli distributed

The obvious thing that is missing is a variant for categorical features like color for instance. It is of course possible to use dummy encoding to transform a categorical feature into indicator features for each category but this breaks the categorical correlation. If a car is red, it obviously isn't green and yellow.

So long story short, are there any plans to add a CategoricalNB? Would you like to see a PR? Or am I missing here something obvious?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions