Naive Bayes

This notebook builds a simple categorical Naive Bayes classifier to predict whether a customer will buy a product based on weather and discount status.

It encodes the categorical features, splits the data into training and test sets, trains CategoricalNB, and makes predictions on the test set.

Finally, it evaluates performance with accuracy and a confusion matrix plot.

Naive_Bayes_all_categorical_features

Share: 

No comments yet! You be the first to comment.

Leave a Comment

Your email address will not be published. Required fields are marked *