Posts

Showing posts with the label Naive Bayes Classifier - Example -classify- play tennis - forecast

Naive Bayes Classifier - Example -classify- play tennis - forecast

Image
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 ,   π‘Ώ^′=(π‘Άπ’–π’•π’π’π’π’Œ=π‘Ίπ’–π’π’π’š, π‘»π’†π’Žπ’‘π’†π’“π’‚π’•π’–π’“π’†=π‘ͺ𝒐𝒐𝒍, π‘―π’–π’Žπ’Šπ’…π’Šπ’•π’š=π‘―π’Šπ’ˆπ’‰, π‘Ύπ’Šπ’π’