The Bayes theorem

In order to understand the Bayes theorem first, before we attempt to take a look at the Naïve Bayes classification method, we should consider this example. Let's assume that among all the people in the U universe, the set of people who have breast cancer is set A, and set B is the set of people who had a screening test and were unfortunately diagnosed with the result positive for breast cancer. This is shown as the overlap region A∩B in the following diagram:

The Bayes theorem

There are two unusual areas that need focus: B – A∩B or people without breast cancer and with a positive test on diagnosis and the event A – A∩B or people with breast cancer ...

Get Mastering Python Data Visualization now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.