Skip to content

wpm/Naive-Bayes-Gibbs-Sampler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 

Repository files navigation

Naive Bayes Gibbs Sampler

This project implements the Gibbs sampler for Naive Bayes document classification described in Resnik and Hardisty 2010, "Gibbs Sampling for the Uninitiated". It closely follows the notation and design put forth in that paper.

There are only two significant differences between the algorithm presented in the paper and the code here. Unlike the paper, this code allows the documents to be grouped into more than two classes, so document priors are generated using a Dirichlet distribution rather than a Beta distribution. Also the equations in the paper are written in terms of probabilities, whereas to avoid underflow errors this code works with log probabilities.

This code depends on Numeric Python.

About

Gibbs sampler for for a Naive Bayes document classifier

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages