Use the conditional probabilities in part (a) to predict the class label for a test sample (A = 1, B = 1, C = 1) using the na ??ve Bayes approach.
Consider the data set shown in Table 5.2.
Let R : (A = 1, B = 1, C = 1) be the test record. To determine its
class, we need to compute P(+|R) and P(?|R). Using Bayes theorem,
P(+|R) = P(R|+)P(+)/P(R) and P(?|R) = P(R|?)P(?)/P(R).
Since P(+) = P(?)=0.5 and P(R) is constant, R can be classified by
comparing P(+|R) and P(?|R).
For this question,
P(R|+) = P(A = 1|+) × P(B = 1|+) × P(C = 1|+) = 0.192
P(R|?) = P(A = 1|?) × P(B = 1|?) × P(C = 1|?)=0.032
Since P(R|+) is larger, the record is assigned to (+) class.
You might also like to view...
The primary role of the ____________________ security professional is to plan, implement, and oversee the most effective way to respond to physical incidents and disasters as they occur.
Fill in the blank(s) with the appropriate word(s).
The language used to code webpages is:
A) HyperText Transfer Protocol. B) Hyperlink Management Language. C) HyperText Markup Language. D) Hyperlink Programming Code.
When you are comparing one string to another string, use the == operator.
Answer the following statement true (T) or false (F)
When calling a procedure, passed arguments and declared parameters must agree in all of the following ways except __________.
a. the order of arguments and parameters must correspond b. the names of the arguments and parameters must correspond c. the types of the arguments and parameters must correspond d. the number of arguments and the number of parameters must be the same