"The Naive Bayes algorithm is based on conditional probabilities. It uses Bayes'
Theorem, a formula that calculates a probability by counting the frequency of values
and combinations of values in the historical data.
Bayes' Theorem finds the probability of an event occurring given the probability
of another event that has already occurred. If B represents the dependent event
and A represents the prior event, Bayes' theorem can be stated as follows.
Prob(B given A) = Prob(A and B)/Prob(A)
To calculate the probability of B given A, the algorithm counts the number of cases
where A and B occur together and divides it by the number of cases where A occurs