Machine Learning: Make Your Own Recommender System (Machine Learning From Scratch Book 3) by Oliver Theobald

Machine Learning: Make Your Own Recommender System (Machine Learning From Scratch Book 3) by Oliver Theobald

Author:Oliver Theobald [Theobald, Oliver]
Language: eng
Format: epub
Publisher: Scatterplot Press
Published: 2018-06-20T00:00:00+00:00


There are two elements to consider for P(B):

1) True-positives: a woman that tests positive (99%) who is pregnant (5%), and

2) False-positives: a woman that tests positive (1%) who isn’t pregnant (95%)

P(B) = (0.99 * 0.05 + 0.01 * 0.95)

Let’s now add P(B) to the equation to solve for P(A|B):

(0.05 * 0.99) / (0.99 * 0.05 + 0.01 * 0.95)

0.0495 / (0.0495 + 0.0095)

0.0495 / 0.059

= 0.8389

Using Bayes’ theorem, we’ve found that the probability of pregnancy given a positive test result P(A|B) is 83.89%, which is significantly lower than the accuracy rate (99%) when only considering pregnant women P(B|A).

This outcome crystalizes when we consider the number of false-positives in respect to the number of true-positives. If we test 1,000 women, we can expect 950 not to be pregnant (95%) and 50 who are pregnant (5%). Among the 950 women who are not pregnant, we can anticipate 9.5 false positives (950 x 0.01). Simultaneously, among the 50 women who are pregnant, 49.5 women are expected to test positive (50 x 0.99). Thus, of the 59 (9.5 + 49.5) women who test positive, 49.5/59 or 83.89% women are actually pregnant.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.