Naive Bayes Classifier - Example -classify- play tennis - forecast
NaΓ―ve Bayes Classifier - Example -classify- play tennis - forecast
- Let’s build a classifier that predicts whether I should play tennis given the forecast.
- It takes four attributes to describe the forecast; namely,
- the outlook,
- the temperature,
- the humidity, and
- the presence or absence of wind.
- Furthermore, the values of the four attributes are qualitative (also known as categorical).
- They take on the values shown below.
- πΆππππππ ∈[πΊππππ,πΆπππππππ, πΉππππ]
- π»ππππππππππ∈[π―ππ,π΄πππ , πͺπππ]
- π―ππππ πππ ∈[π―πππ, π΅πππππ]
- πΎπππ π ∈[πΎπππ, πΊπππππ]
- The class label is the variable, Play and takes the values Yes or No.
- π·πππ∈[πππ, π΅π]
- We read-in training data below that has been collected over 14 days
Classification Phase
Let’s say, we get a new instance of the weather condition,
πΏ^′=(πΆππππππ=πΊππππ, π»ππππππππππ=πͺπππ, π―ππππ
πππ=π―πππ, πΎπππ
=πΊπππππ)
that will have to be classified (i.e., are we going to play tennis under the conditions specified by π^′).
With the MAP rule, we compute the posterior probabilities.
This is easily done by looking up the tables we built in the learning phase.
Comments
Post a Comment