Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bernoulli Naive Bayes #59

Merged
merged 9 commits into from
Jul 26, 2014
Merged

Conversation

tncardoso
Copy link
Contributor

This is a package for Naive Bayes Classifiers. There are other ones that should be implemented (multinomial, gaussian) but this is a start.

This is the first draft of the bernoulli naive bayes implementation. It
is missing the Fit function tests and the Predict function.
Refactored the algorithm to use base.Instances. Rewrote the Fit method
to pre-calculate priors and conditional probabilities.
Added the logCondProb tests for a simple test case with two classes.
Added predict function along with its test. Current interface is the
same of the KNN example. In other words, only the class string is
returned from the PredictOne function.
Since the number of instances in each class are stored, there is no need
to keep the pre-calculated priors.
@Sentimentron
Copy link
Collaborator

@sjwhitworth @lazywei I'd be happy to merge this.

@lazywei
Copy link
Collaborator

lazywei commented Jul 26, 2014

Sure thing!

sjwhitworth added a commit that referenced this pull request Jul 26, 2014
@sjwhitworth sjwhitworth merged commit 8cc8c7b into sjwhitworth:master Jul 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants