Introduction
How does a doctor diagnose? They know how common each illness is, and how often each symptom appears with each illness. Then, for a patient with a set of symptoms, they ask: "Which illness best explains these symptoms?"
Naive Bayes classifiers reason exactly this way. They are:
- very fast to train and predict — just counting and multiplying;
- good with little data and with huge numbers of features;
- a classic choice for text classification (spam filtering, topic labelling, sentiment).
They rely on one bold simplification — the "naive" assumption — which is often wrong in reality, yet the classifier still works surprisingly well.