Naive Bayes Model Flashcards
What is an assumption of Naive Bayes model?
- independence among predictors.
The effect of the value of a predictor variable on a given class is not affected by the values of other predictors.
Explain Bayes’ theorem
calculating the posterior probability, which is the likelihood of an event occurring after taking into consideration new information. The weather data set will help you build a model to decide whether to go outside and play soccer.
Naive Bayes
calculates posterior probabilities and makes predictions based on which outcome has the highest probability.
What type of machine learning model is Naive Bayes model?
supervised learning - classification
Bayes’ Theorem equation
equation - find the probability of an event, A, given that another event B is true.
P(A|B) = P(B|A) * P(A) / P(B)
P(A)
P(A) probability of the outcome overall. the prior probability of event A before any evidence (feature) is seen.
P(B|A)
conditional probability. the probability of B, given A
P(B)
probability of the value of the predictor variable
In probability, what does “A” represent?
class label: one of the possible outcomes or categories within a dataset.
In probability, what does “B” represent?
predictor value
What does P(A|B) stand for?
- the posterior probability
- the probability of the class label (A) after the evidence (B, feature) has been seen.
In context of probability, what is conditional independence?
Variables B and C are independent of one another on the condition that a third variable, A,assumption that each predictor variable (different Bs in the formula) is independent from the others, conditional on the class (A).
conditional independence is about how variables (Bs) interact with each other when you take into account the influence of a third variable (A).
What’s the conditional independence equation?
P(B|C, A) = P(B|A)
the probability of B, given C and A, is equal to the probability of B, given A.
Or given A, introducing C does not change the probability of B.
Naive Bayes assumption (in reality)
the predictor variables (B and C) are assumed to be conditionally independent of each other, given the target variable (A).
very often is not actually true.
However, Naive Bayes models still often perform well in spite of the data violating the assumption.
Naive Bayes assumption on predictor variables
the individual predictor variables (Bs, Cs) are assumed to contribute equally to the model’s prediction