The naive Bayes classifier is designed for use when predictors are independent of one another within each class, but it appears to work well in practice even when that independence assumption is not valid. Plot Posterior Classification Probabilities. This example shows how to visualize classification probabilities for the Naive Bayes