Page 57 - Data Science Algorithms in a Week
P. 57

Naive Bayes


             No      Yes No     Yes       No     Yes

             No      No    No   Yes       No     Yes
             No      Yes No     No        No     No
             No      No    No   No        Yes    No

             Yes     Yes Yes    No        Yes    Yes
             Yes     No    No   No        Yes    Yes

             No      Yes Yes    No        No     No
             Yes     No    Yes  No        Yes    ?

                      a) What is the result of the naive Bayes algorithm when given an email that
                      contains the words money, rich, and secret, but does not contain the words free
                      and naughty?
                      b) Do you agree with the result of the algorithm? Is the naive Bayes algorithm, as
                      used here, a good method to classify email? Justify your answers.

                   6.  Gender classification. Assume we are given the following data about 10 people:

             Height in cm Weight in kg Hair length Gender
             180           75            Short       Male

             174           71            Short       Male
             184           83            Short       Male

             168           63            Short       Male
             178           70            Long        Male
             170           59            Long        Female

             164           53            Short       Female
             155           46            Long        Female

             162           52            Long        Female
             166           55            Long        Female
             172           60            Long        ?






                                                     [ 45 ]
   52   53   54   55   56   57   58   59   60   61   62