Switch to full style
General MATLAB code examples.
Post a reply

naive Bayes classifier in MATLAB

Tue Apr 03, 2012 1:38 am

In this example we show how to create a naive Bayes classifier in MATLAB.
Code:

  BaysianObject
=NaiveBayes.fit(TrainData, class);
 


TrainData: contains the training data vectors.
class: is class label for each vector.


Now, you can we used the created object above, to classify a vector.
Code:

  classLabel
=  posterior(BaysianObject,testVector);
 




Post a reply
  Related Posts  to : naive Bayes classifier in MATLAB
 Naive Bayes Classification (Binary )- Supervised Learning     -  
 random forest algorithm classifier     -  
 Random Search for tuning classifier parameters     -  
 Get the important variables of random forest classifier     -  
 Cost Sensitive Classifier Random Forest Java in weka     -  
 run .exe program in matlab     -  
 Matlab SVM training problem     -  
 Matlab basics examples     -  
 read file in matlab     -  
 help me How do I load image from my pc to matlab     -  

Topic Tags

Matlab Classifier