Concept - Prior Probability

Definition

The initial guess of how likely a class is, made before looking at the feature values: “The initial guesses are called Prior Probabilities.” (s.194)

Details

  • Can be any probability we want, but a common choice is estimated from the training data (s.188).
  • Example: 8 of 16 training people loved Troll 2, so (s.189); likewise (s.192).
  • It is the first factor in the class score (s.196).

Concept - Gaussian Naive Bayes, Concept - Likelihood, Concept - Naive Bayes

Source chunk: 03 Text Classification - Chunk 07 (s.181-210)

Spam example (s.67-71, s.81-83)

  • Source: 03 Text Classification - Chunk 03 (s.61-90).
  • “We start with an initial guess about the probability that any message, regardless of what it says, is a normal message”: (s.67); can be any value, common choice estimated from training data (s.68).
  • 8 of the 12 training messages are normal: (s.69). Terminology Alert: this initial guess is called a Prior Probability (s.71).
  • Spam: 4 of 12 messages, (s.83).
  • Class score = prior x word likelihoods, e.g. (s.77); related: Concept - Posterior Probability.

Priors in the log score (s.224, s.215)

Initial guess (s.224) and (s.211); in the log score the prior enters as (s.216, s.235). See 03 Text Classification - Chunk 08 (s.211-240).

In the “Dear Friend” / “Lunch Money” examples (03 Text Classification - Chunk 04 (s.91-120))

  • Priors and are the starting “guess” that is multiplied by the word likelihoods (s.103). When a likelihood is 0 the prior no longer matters: “it doesn’t matter what value we picked for the initial guess” (s.112-115).

From chunk 02 (s.31)

If every word of a test document is OOV and OOV words are ignored, Naive Bayes reverts to the class priors (Concept - Out of Vocabulary (OOV), s.31).

From chunk 01 (s.1-30)

is the prior probability of hypothesis and the prior probability of the evidence (s.13); the prior “encodes the knowledge/preference” in Concept - Maximum A Posteriori (s.18). Class priors in the text example are document-count ratios: , (s.27). Evolution from flat prior to peaked posterior: s.15-17 (Concept - Bayes Rule).

Source chunk: 03 Text Classification - Chunk 01 (s.1-30)