Let's first try the Bernoulli naive Bayes classifier (Here, it indicates whether players can 'play'.)
# Import Bernoulli Naive Bayes model
from sklearn.naive_bayes import GaussianNB, BernoulliNB
# Create Bernoulli Classifier model
BernoulliB = BernoulliNB()
# Train the model using the training sets
model.fit(features_ls, label)
# Predict Output
predicted = model.predict([[0,2]]) # 0:Overcast, 2:Mild
print("Predicted Value:", predicted)
Predicted Value: [1]
{7)
Lab 9: Classification using Decision Trees & Naive Bayes
Exercise 2.3: Repeat the experiment again but now using Gaussian Naive Bayes (just replace model = GaussianNB()). Is the result the same?