Skip to content
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.

naïve Bayes should tell us probability of class membership? #139

Open
zackmdavis opened this issue Sep 23, 2016 · 3 comments
Open

naïve Bayes should tell us probability of class membership? #139

zackmdavis opened this issue Sep 23, 2016 · 3 comments

Comments

@zackmdavis
Copy link
Collaborator

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?

@AtheMathmo
Copy link
Owner

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.

@zackmdavis
Copy link
Collaborator Author

documentation bug, then (I know, patch or STFU)

@AtheMathmo
Copy link
Owner

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!)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants