File Exchange

image thumbnail

Naive Bayes Classifier

version 1.0.0.0 (352 KB) by Indraneel Biswas
Script for Naive Bayes Classifier in Matlab 2008a

19 Downloads

Updated 06 Aug 2012

View License

I use Matlab 2008a which does not support Naive Bayes Classifier. Script supports normal and kernel distributions. Statistics toolbox for 2008a version is used in the script. Also includes function for confusionmat
Sample data provided is from Mathworks Webinar: Computational Statistics: Getting Started with Classification Using MATLAB <http://www.mathworks.com/matlabcentral/fileexchange/28770-introduction-to-classification>

Comments and Ratings (9)

hao zhang

Changbin Li

Hi Thanks for your code! I have a question. why did you use normcdf not normpdf?

can you please explain what are this coding for?
[pv0,id]=max(P,[],2);
for i=1:length(id)
pv(i,1)=yu(id(i));

I have a question. Can you help me? Thanks.

P(j,:)=fy.*prod(fu,2)';

can you tell me what does it mean please.

chirag

working well.. Thankx

I am running this code. But its showing error in Matlab 2014b
Undefined function 'cvpartition' for input arguments of type 'double'.

please help

thanks

Preeti

River

Oleg

A working implementation but it's too much oriented onto author's task.

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

Inspired by: Introduction to Classification