The Naive Bayes classifier: How it works