NaiveBayes.jl icon indicating copy to clipboard operation
NaiveBayes.jl copied to clipboard

`predict_proba` reports unnormalised probabilities

Open ablaom opened this issue 6 years ago • 2 comments

The probabilities reported by this method (actually the log probabilities) are not normalised. Ie, if you exponentiate the reported probabilities and sum over all classes you do not get one.

It would be nice if this (somewhat unexpected) behaviour were documented somewhere, or if normalised probabilities were reported.

ablaom avatar Feb 19 '19 21:02 ablaom

Does it hold for all models or for some specific?

The right way would be to fix it and release a new version, but honestly I'm not sure I'll have time to dive into it anytime soon.

dfdx avatar Feb 20 '19 11:02 dfdx

The method is in common.jl, so it applies to all models. So you just need to fix that one method.

There is no urgency from our end. We are doing MLJ model implementations for NaiveBayes and, having noticed the problem, we have accounted for it.

ablaom avatar Feb 20 '19 21:02 ablaom