The naive Bayes classifier seems to have a flaw in its
current implementation. The files affected are:
kernel/algorithms/naivebayesclassifier.*
The bug is in the computation of the conditional
probabilities. The current implementation does not
quite compute what is should. Instead of computing the
probability of (condition attribute having a given
value | the value of the decision attribute), it looks
at the distribution of (attribute, value) pairs.
Rather, it should use the attribute index to acquire
the correct histogram from which this probability
should be estimated.
Other issues:
* Instead of working with the actual probabilities,
the algorithm should work with the logarithm of the
probabilities, and then transform this back to a
probability at the very end. This would make the
algorithm more robust against numerical underflows.
* It should be fairly easy to add support for a
smoothing parameter (a la Laplace or Lidstone
smoothing) to the probability estimation procedure.