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 ,   ๐‘ฟ^′=(๐‘ถ๐’–๐’•๐’๐’๐’๐’Œ=๐‘บ๐’–๐’๐’๐’š, ๐‘ป๐’†๐’Ž๐’‘๐’†๐’“๐’‚๐’•๐’–๐’“๐’†=?...