Bayesian Methods#
Environment setup#
import platform
print(f"Python version: {platform.python_version()}")
assert platform.python_version_tuple() >= ("3", "6")
import numpy as np
print(f"NumPy version: {np.__version__}")
from IPython.display import YouTubeVideo
Python version: 3.7.5
NumPy version: 1.18.1
Bayes’ theorem#
Thomas Bayes (1701-1761)#
English statistician, philosopher and presbyterian minister.
Bayes’ legacy#
Blaise Pascal (1623-1662) pioneered the study of probabilies of effects given causes.
On the contrary, Thomas Bayes proposed a formula, known as Bayes’s theorem, for computing the probability of a cause given an effect.
Intuitive explanation#
YouTubeVideo("HZGCoVF3YvM")
Quick proof#
YouTubeVideo("U_85TaXbeIo")
Naïve Bayes#
Naïve Bayes in a nutshell#
Set of (supervised) learning algorithms based on applying Bayes’ theorem.
“Naïve” assumption: conditional independence between every pair of features given the value of the class variable.