Question02/11/2024
Applying Bayes Rule
you have the flu, you just coughed
Assume:
what is P (flu | cough)?
Bayesian classifiers
-This is where the "naïve" in "naïve Bays" comes in: if we make naïve assumptions about the generative model for each label, we can find a rough approximation of the generative model for each class, and then proceed with the Bayesian classification.
- Different types of naive Bayes classifiers rest on different naïve assumptions about the data.
- The naïve Bayes classification algorithm was built on the assumption of independent events, to avoid the need to compute there messy conditional probabilities.
- If everything was independent, the world of probability would be a much simpler place.
Studdy Solution
STEP 1
1.
2.
3.
STEP 2
1. حساب احتمال السعال.
2. تطبيق قاعدة بايز لإيجاد .
STEP 3
لحساب احتمال السعال نستخدم:
\[
P(\text{cough}) = P(\text{cough} \mid \text{flu}) \cdot P(\text{flu}) + P(\text{cough} \mid \sim \text{flu}) \cdot P(\sim \text{flu}) $
STEP 4
نحسب :
\[
P(\sim \text{flu}) = 1 - P(\text{flu}) = 1 - 0.05 = 0.95 $
STEP 5
نحسب :
\[
P(\text{cough}) = (0.80 \times 0.05) + (0.2 \times 0.95) $
\[
P(\text{cough}) = 0.04 + 0.19 = 0.23 $
STEP 6
تطبيق قاعدة بايز لإيجاد :
\[
P(\text{flu} \mid \text{cough}) = \frac{P(\text{cough} \mid \text{flu}) \cdot P(\text{flu})}{P(\text{cough})} $
\[
P(\text{flu} \mid \text{cough}) = \frac{0.80 \times 0.05}{0.23} $
\[
P(\text{flu} \mid \text{cough}) = \frac{0.04}{0.23} \approx 0.1739 $
الاحتمال هو:
Was this helpful?