rusty-machine
rusty-machine copied to clipboard
naïve Bayes should tell us probability of class membership?
The docs say (and what I would have expected from my textbook reading elsewhere) that we "compute the probability that each input belongs to a given class", but the actual code seems to just predict the most likely class (marked as 1. in the result matrix). Shouldn't we get the probabilities for each class, or am I missing something?
You might be missing the get_log_probs
function.
I say might as your point is still relevant. I chose to have predict
return the class labels and hid the probabilities in a separate function. I believe that get_log_probs
essentially does the same thing as predict but without getting the labels.
documentation bug, then (I know, patch or STFU)
I know, patch or STFU
Ha! No, it's really valuable to be made aware of these things.
It is also an option to change the api - we have some breaking changes pending right now. If you want to suggest an update now is a good time. Otherwise I'm happy to try and update the docs (I'd appreciate you reading it over if I do though!)