ELI5: Naive Bayes Classifier

Here's a nice and simple explanation of a Naive Bayes classifier used in machine learning:

A classifier is a way to use math to identify something. For example, you see something on the playground that is red. It could be a playground ball, or maybe a rabbit, or a tennis ball - but it's probably not a rabbit or tennis ball because you've never seen a red one of those before.

A fellow named Thomas Bayes figured out that if you actually knew how often playground balls, rabbits, and tennis balls were red, you could use math to work out a number that says how often a red thing that you see is a playground ball, rabbit, or tennis ball. Pretty neat. Maybe you notice other things about what you see too: it's size, shape, whatever. Well, Bayes' rule works even when you have more than one way to describe what you're looking at.

A Bayes Classifer is, then, something that uses Bayes rules to figure out how often red things are playground balls, how often they are rabbits, and how often they are tennis balls and then picks the one that happens most often. If most playground balls are red, and most rabbits an tennis balls are not, then when you see something that's red, it's probably a playground ball.

A Naive Bayes Classifier is one where you have several things that describe what you are looking at, like it's color, size, whether it has eyes or not… and you assume that they have nothing to do with each other. The color of something has nothing to do with it's size or whether it has eyes or not. This might not be a good a assumption, for example, there are very few purple things with eyes. But we may not know that, so we'll just say that it is so because it makes the math much easier.