๐ -> 10/3/24:
๐ค Vocab
โ Unit and Larger Context
Naive Probability Continued
Naive Definition:
- Not applicable in the cases that:
- Not all events are equally likely
- Sample space is infinite
Critical Naive Bayes Formulas:
P(Class | Feature) = P(Class and Feature) / P(Feature)
P(Feature) = P(Feature and Class) + P(Feature and Not Class)
โ๏ธ -> Scratch Notes
Sample space is heads out of 2 flips
Naive probability would lead you to believe that all outcomes are equally likely, and P(1 head) = 1/3. In reality, its 1/2.
Worked Example
If you roll 2 dice:
Number rolled on first dice is x, on 2nd is y
Find P(x=2 | x + y = 8) = |A | B| / |B| = 1/36 / 5/36 = 1/5
Find P(x + y = 8 | x=2) = |B | A| / |A| = 1/36 / 1/6 = 1/6
Naive Bayes
Patient tests for cancer
P(Cancer | High Protein) = P(Cancer and High Protein) / P(High Protein)
P(HP) = P(HP & C) + P(HP & not C)
Sample 1000 that have cancer:
Given: Cancer
| HP | ~HP | |
|---|---|---|
| C | .8 | .2 |
| ~C | .1 | .9 |
Given: P(~C) = .01
P(HP and C) = P(HP | C) * P(C)
P(HP & ~C) = P(HP | ~C) * P(~C)
Naive Bayes:
P(Class | Feature) = P(Class and Feature) / P(Feature)
P(Feature) = P(Feature and Class) + P(Feature and Not Class)
Given: Covid
| POS | NEG | |
|---|---|---|
| COV | ||
| ~COV | ||
| P(COV | NEG) = P(COV and NEG) / P(NEG) | |
| P(NEG) = P(NEG and C) P(NEG and ~C) |
P(NEG and C) = P(NEG | C) P(C) = .01 x .15
P(NEG and ~C) = P(NEG | ~C) P(~C) = .9 x .85w
๐งช-> Example
- List examples of where entry contents can fit in a larger context
๐ -> Related Word
- Link all related words