{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# hw2_Solution - CS 6375 Homework 2 Chenxi Zeng UTD ID...

This preview shows pages 1–3. Sign up to view the full content.

CS 6375 Homework 2 Chenxi Zeng, UTD ID: 11124236 1. We assume that Y stand for the attribute normal(N) or fake(F) when we pick one coin from the bag, and i F stand for get a head(H) or tail(T) when we flip it at the i th time( i =1,2…,k). A. We are required to compute 1 ( | ) P Y F F H = = . 1 ( | ) P Y F F H = = = 1 1 ( , ) ( ) P Y F F H P F H = = = = 1 1 1 1 2 n n n n - × + = 2 1 n + . B. We are required to compute ( | , 1,2,..., ) i P Y F F H i k = = = . ( | , 1,2,..., ) i P Y F F H i k = = = = ( , , 1,2,..., ) ( , 1,2,..., ) i i P Y F F H i k P F H i k = = = = = = 1 1 1 1 2 k n n n n - × + ÷ = 2 2 1 k k n + - . 2. We assume that / M m stand for the whether it use major studio(Y or N), / G g stand for the genre Sci-fi(S) or action(A) or music(M), / W w stand for whether the movie win award (Y or N), and / L l stand for whether the person like the movie(Y or N). (A). naïve Bayes classifier (i) NB l = , arg max l Y N = ( ) P L l = ( | ) P M Y L l = = ( | ) P G A L l = = ( | ) P W Y L l = =

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

View Full Document
= , arg max l Y N = { ( ) ( | ) ( | ) ( | ), P L Y P M Y L Y P G A L Y P W Y L Y = = = = = = = ( ) ( | ) ( | ) ( | ) P L N P M Y L N P G A L N P W Y L N = = = = = = = } = , arg max l Y N = { 2 3 1 3 5 4 2 4 × × × , 3 1 1 1 5 6 3 3 × × × } = , arg max l Y N = { 9 1 , 80 90 } =Y (ii) NB l = , arg max l Y N = ( ) P L l = ( | ) P M Y L l = = ( | ) P G A L l = = ( | ) P W N L l = = = ,
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}