Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
0Activity
0 of .
Results for:
No results containing your search query
P. 1
06 NaiveBayes Example

06 NaiveBayes Example

Ratings: (0)|Views: 7 |Likes:
Published by Nambi Sembilu

More info:

Published by: Nambi Sembilu on Jun 13, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

06/13/2012

pdf

text

original

 
Naive Bayes Classifier example
Eric MeisnerNovember 22, 2003
1 The Classifier
TheBayesNaiveclassifierselectsthemostlikelyclassification
nb
giventheattributevalues
a
1
,a
2
,...a
n
.This results in:
nb
=
argmax
v
j
(
v
j
)
(
a
i
|
v
j
)
(1)We generally estimate
(
a
i
|
v
j
)
using m-estimates:
(
a
i
|
v
j
) =
n
c
+
mpn
+
m
(2)where:
n
= the number of training examples for which
v
=
v
j
n
c
= number of examples for which
v
=
v
j
and
a
=
a
i
 p
= a priori estimate for
(
a
i
|
v
j
)
m
= the equivalent sample size
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. Color Type Origin Stolen?1 Red Sports Domestic Yes2 Red Sports Domestic No3 Red Sports Domestic Yes4 Yellow Sports Domestic No5 Yellow Sports Imported Yes6 Yellow SUV Imported No7 Yellow SUV Imported Yes8 Yellow SUV Domestic No9 Red SUV Imported No10 Red Sports Imported 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 dataset. Lookingbackatequation(2)wecanseehowtocomputethis. Weneedtocalculatetheprobabilities
P(Red|Yes), P(SUV|Yes), P(Domestic|Yes) ,P(Red|No) , P(SUV|No), and P(Domestic|No)
1

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->