Probability estimators for Naive Bayes.

A Naive Bayes classifier needs P(x_i \mid c) for every feature. These estimators are the pluggable pieces that supply it, which is what lets one classifier handle numeric and categorical features by swapping the estimator rather than the algorithm.

Estimators

  • NormalEstimator: Fits a Gaussian per feature and class. The default for
numeric data, and the right choice when a feature is roughly bell-shaped.
  • KernelEstimator: Kernel density estimation. Slower, but assumes no
particular distribution — use it for skewed or multi-modal features.
  • DiscreteEstimator: Smoothed counts, for categorical or already
discretised features.
  • ProbabilityEstimator: The base class to subclass for a new one.

Modules