Problem: Create a Naive Bayesian Classifier for the iris dataset
Given:
The iris dataset contains 150 samples of data, 50 for each variety of iris: Iris-setosa, Iris-versicolor, & Iris-virginica. We will use 149 samples of the data to train the classifier and test it with one sample of Iris-virginica, which has the following features: sepal-length = 5.9, sepal-width = 3, petal-length = 5.1, petal-width = 1.8.
Give the formula for the posterior numerator for each variety, e.g., posterior numerator (Iris-setosa). Calculate P for each variety, e.g., P(Iris-setosa).
Give the formula for p(sepal-length | Iris-setosa), if the mean value and variance of sepal-length for Iris-setosa is 5.0 and 0.12, respectively. Substitute the values for x, μ, and σ^2 into the formula.
How many conditional probabilities will the Naive Bayesian Classifier need to calculate to classify the test sample?
If posterior numerator (Iris-setosa) = 0.005, posterior numerator (Iris-versicolor) = 0.002, and posterior numerator (Iris-virginica) = 0.003, which variety did the Naive Bayesian Classifier predict the test sample to be?