lecture23.pdf - COMPSCI 240 Reasoning Under Uncertainty...

Info icon This preview shows pages 1–16. Sign up to view the full content.

COMPSCI 240: Reasoning Under Uncertainty Arya Mazumdar University of Massachusetts at Amherst Fall 2016
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Lecture 23
Image of page 2
Hypothesis Testing
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Hypothesis testing When you receive an email you have two “hypotheses”: H 1 = email is spam H 2 = email is not spam and note that these are partitioning events.
Image of page 4
Hypothesis testing When you receive an email you have two “hypotheses”: H 1 = email is spam H 2 = email is not spam and note that these are partitioning events. You have some “observed data” e.g., D = email contains the word ‘cash’
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Hypothesis testing When you receive an email you have two “hypotheses”: H 1 = email is spam H 2 = email is not spam and note that these are partitioning events. You have some “observed data” e.g., D = email contains the word ‘cash’ How do you use the observed data to pick one of the hypotheses?
Image of page 6
Hypothesis testing When you receive an email you have two “hypotheses”: H 1 = email is spam H 2 = email is not spam and note that these are partitioning events. You have some “observed data” e.g., D = email contains the word ‘cash’ How do you use the observed data to pick one of the hypotheses? We want to pick the “maximum a posteriori hypothesis” (MAP), i.e., the hypothesis H i than maximizes P ( H i | D ).
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Using Bayes Theorem If P ( H 1 ) = 0 . 7 , P ( H 2 ) = 0 . 3 , P ( D | H 1 ) = 1 / 2, P ( D | H 2 ) = 1 / 3 then:
Image of page 8
Using Bayes Theorem If P ( H 1 ) = 0 . 7 , P ( H 2 ) = 0 . 3 , P ( D | H 1 ) = 1 / 2, P ( D | H 2 ) = 1 / 3 then: P ( H 1 | D ) = P ( H 1 D ) P ( D ) = P ( D | H 1 ) P ( H 1 ) P ( D | H 1 ) P ( H 1 ) + P ( D | H 2 ) P ( H 2 ) = 1 / 2 × 0 . 7 P ( D | H 1 ) P ( H 1 ) + P ( D | H 2 ) P ( H 2 ) = 0 . 35 P ( D | H 1 ) P ( H 1 ) + P ( D | H 2 ) P ( H 2 )
Image of page 9

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Using Bayes Theorem If P ( H 1 ) = 0 . 7 , P ( H 2 ) = 0 . 3 , P ( D | H 1 ) = 1 / 2, P ( D | H 2 ) = 1 / 3 then: P ( H 1 | D ) = P ( H 1 D ) P ( D ) = P ( D | H 1 ) P ( H 1 ) P ( D | H 1 ) P ( H 1 ) + P ( D | H 2 ) P ( H 2 ) = 1 / 2 × 0 . 7 P ( D | H 1 ) P ( H 1 ) + P ( D | H 2 ) P ( H 2 ) = 0 . 35 P ( D | H 1 ) P ( H 1 ) + P ( D | H 2 ) P ( H 2 ) and similarly P ( H 2 | D ) = 0 . 3 × 1 / 3 P ( D | H 1 ) P ( H 1 ) + P ( D | H 2 ) P ( H 2 ) = 0 . 1 P ( D | H 1 ) P ( H 1 ) + P ( D | H 2 ) P ( H 2 )
Image of page 10
Using Bayes Theorem If P ( H 1 ) = 0 . 7 , P ( H 2 ) = 0 . 3 , P ( D | H 1 ) = 1 / 2, P ( D | H 2 ) = 1 / 3 then: P ( H 1 | D ) = P ( H 1 D ) P ( D ) = P ( D | H 1 ) P ( H 1 ) P ( D | H 1 ) P ( H 1 ) + P ( D | H 2 ) P ( H 2 ) = 1 / 2 × 0 . 7 P ( D | H 1 ) P ( H 1 ) + P ( D | H 2 ) P ( H 2 ) = 0 . 35 P ( D | H 1 ) P ( H 1 ) + P ( D | H 2 ) P ( H 2 ) and similarly P ( H 2 | D ) = 0 . 3 × 1 / 3 P ( D | H 1 ) P ( H 1 ) + P ( D | H 2 ) P ( H 2 ) = 0 . 1 P ( D | H 1 ) P ( H 1 ) + P ( D | H 2 ) P ( H 2 ) Therefore the MAP hypothesis is H 1 .
Image of page 11

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Combining Observed Data Suppose we have two pieces of observed data: D 1 = email contains the word ‘cash’ D 2 = email contains the word ‘pharmacy’
Image of page 12
Combining Observed Data Suppose we have two pieces of observed data: D 1 = email contains the word ‘cash’ D 2 = email contains the word ‘pharmacy’ The MAP hypothesis is the one maximizing P ( H j | D 1 D 2 ) where P ( H j | D 1 D 2 ) = P ( D 1 D 2 | H j ) P ( H j ) P ( D 1 D 2 | H 1 ) P ( H 1 ) + P ( D 2 D 2 | H 2 ) P ( H 2 )
Image of page 13

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Naive Bayes Classification In Naive Bayes Classification (NBC) we assume that the observed data is independent conditioned on either of the hypotheses, i.e., P ( D 1 D 2 | H 1 ) = P ( D 1 | H 1 ) P ( D 2 | H 1 ) P ( D 1 D 2 | H 2 ) = P ( D 1 | H 2 ) P ( D 2 | H 2 )
Image of page 14
Naive Bayes Classification In Naive Bayes Classification (NBC) we assume that the
Image of page 15

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Image of page 16
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern