Naive Bayes Classifier

Version 1.0 (5.14 KB) by Mo Chen
Naive Bayes Classifier working for both continue and discrete data


Updated Tue, 08 Mar 2016 03:14:08 +0000

View License

This package contains Naive Bayes classifiers. NB assumes that dimensions of data are independent, any base distribution can be used as long as the whole model satisfy the NB assumption.
The standard NB uses Bernoulli as the base distribution. It works for binary data. This package also provides NB classifier with Gaussian base which works for real value data.

I tried my best to make the code succinct, so that it is easy to follow. Please try the demo script in the package.

This package is now a part of the PRML toolbox (

Cite As

Mo Chen (2023). Naive Bayes Classifier (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2016a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes