Bayes Misclassification error and plot : pattern recognition [closed]
- by user1214586
Below is a Matlab code for Bayes classifier which classifies arbitrary numbers into their classes.
 training = [3;5;17;19;24;27;31;38;45;48;52;56;66;69;73;78;84;88]; 
     target_class = [0;0;10;10;20;20;30;30;40;40;50;50;60;60;70;70;80;80];  
      test = [1:2:90]'; 
     class  = classify(test,training, target_class, 'diaglinear');  % Naive Bayes classifier 
 [test class]
If someone could provide code snippets for calculating the Bayes error for misclassification and accuracy.Also, is it possible to plot a scatter plot and histogram indicating the number of data points belonging to different classes? Thank you.