Bayesian Classification- problem (1)
Bayesian Classification- problem (1)
A Bayes classifier is a simple probabilistic classifier based on applying Bayes' theorem with
strong independence assumptions. A more descriptive term for the underlying probability model
would be "independent feature model".
In simple terms, a naive Bayes classifier assumes that the presence (or absence) of a particular
feature of a class is unrelated to the presence (or absence) of any other feature.
E.g.,Given that X will buy computer, the prob. that X is 31..40, medium income
Bayes theorem is useful in that it provides a way of calculating the posteriori probability, P(H|X),
from P(H),P(X) and P(X|H), Bayes theorem can be stated as
P( X|H ) P( H )
P( H|X )=
P( X )
Let D be a training set of tuples and their associated class labels, and each tuple is
represented by an n-D attribute vector X = (x1, x2, …, xn)
Classification is to derive the maximum posteriori, i.e., the maximal P(C i|X)
Ex: Consider the following Training dataset to illustrate the classification for predicting a class
label for the situation “A student age is less than or equal to 30 with medium income and fair
credit rating purchased computer or not”.
The table represents a dataset used for a classification problem. We're trying to predict whether
someone "buys a computer" (the "Class" column) based on several attributes:
Class: buys_computer: The target variable we want to predict. It's binary (yes/no).
1. Calculate Prior Probabilities P(Ci):
This step calculates the probability of observing specific attribute values (X) given each class
(Ci).