This action might not be possible to undo. Are you sure you want to continue?

Eric Meisner November 22, 2003

1

The Classiﬁer

The Bayes Naive classiﬁer selects the most likely classiﬁcation Vnb given the attribute values a1 , a2 , . . . an . This results in: Vnb = argmaxvj ∈V P (vj ) P (ai |vj ) (1) We generally estimate P (ai |vj ) using m-estimates: P (ai |vj ) = where: n= nc = p= m= the number of training examples for which v = vj number of examples for which v = vj and a = ai a priori estimate for P (ai |vj ) the equivalent sample size nc + mp n+m (2)

2

Car theft Example

Attributes are Color , Type , Origin, and the subject, stolen can be either yes or no.

2.1

data set

Example No. 1 2 3 4 5 6 7 8 9 10 Color Red Red Red Yellow Yellow Yellow Yellow Yellow Red Red Type Sports Sports Sports Sports Sports SUV SUV SUV SUV Sports Origin Domestic Domestic Domestic Domestic Imported Imported Imported Domestic Imported Imported Stolen? Yes No Yes No Yes No Yes No No Yes

2.2

Training example

We want to classify a Red Domestic SUV. Note there is no example of a Red Domestic SUV in our data set. Looking back at equation (2) we can see how to compute this. We need to calculate the probabilities P(Red|Yes), P(SUV|Yes), P(Domestic|Yes) , P(Red|No) , P(SUV|No), and P(Domestic|No) 1

and multiply them by P(Yes) and P(No) respectively . We can estimate these values using equation (3). Yes: Red: n = 5 n_c= 3 p = .5 m = 3 SUV: n = 5 n_c = 1 p = .5 m = 3 Domestic: n = 5 n_c = 2 p = .5 m = 3 No: Red: n = 5 n_c = 2 p = .5 m = 3 SUV: n = 5 n_c = 3 p = .5 m = 3 Domestic: n = 5 n_c = 3 p = .5 m =3

Looking at P (Red|Y es), we have 5 cases where vj = Yes , and in 3 of those cases ai = Red. So for P (Red|Y es), n = 5 and nc = 3. Note that all attribute are binary (two possible values). We are assuming no other information so, p = 1 / (number-of-attribute-values) = 0.5 for all of our attributes. Our m value is arbitrary, (We will use m = 3) but consistent for all attributes. Now we simply apply eqauation (3) using the precomputed values of n , nc , p, and m. 3 + 3 ∗ .5 = .56 5+3 1 + 3 ∗ .5 P (SU V |Y es) = = .31 5+3 2 + 3 ∗ .5 P (Domestic|Y es) = = .43 5+3 P (Red|Y es) = 2 + 3 ∗ .5 = .43 5+3 3 + 3 ∗ .5 P (SU V |N o) = = .56 5+3 3 + 3 ∗ .5 P (Domestic|N o) = = .56 5+3 P (Red|N o) =

We have P (Y es) = .5 and P (N o) = .5, so we can apply equation (2). For v = Y es, we have P(Yes) * P(Red | Yes) * P(SUV | Yes) * P(Domestic|Yes) = .5 * .56 * .31 * .43 = .037

and for v = N o, we have P(No) * P(Red | No) * P(SUV | No) * P (Domestic | No) = .5 * .43 * .56 * .56 = .069 Since 0.069 > 0.037, our example gets classiﬁed as ’NO’

2

- Multi Multi Presentation Vienna
- Statistics second degree parabola
- K MeansClustering
- Observer Pole Placement
- GRE数学术语总汇
- Spectral Estimation Modern
- camcal
- Spherical Cordinates
- Lecture3 Pss
- Kuliah 5 Estimasi Bagian 2
- Form
- poly sy
- FEM Example
- Polynomial Representation and Addition
- 01 Numerical Integration
- 2013-10-17 Finding Instantaneous Rate of Change Exactly
- Algebra -Factoring
- Vector 1
- 109b-5s
- Elliptic
- Tutorial 3 Differentiation
- inverse functions
- Chapter 7 Svm
- Function Part2
- TG_Designing for Effect of Mxy by Wood-Armer Method
- Chapter 5-risk.pdf
- ME414_07F_HW1
- handout20
- hw3
- 20938611 Moment Area Method
- 06 NaiveBayes Example

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue reading from where you left off, or restart the preview.

scribd