How to implement a Naive Bayes classifier with Tensorflow

1 · Stathis Kamperis · Dec. 31, 2020, midnight
Contents Introduction The mathematical formulation Tensorflow example with the iris dataset Load and preprocess the data Construct the custom training loop Train the model Measure model’s accuracy Plot the decision regions A note regarding Gaussian distributions Pros and cons of naive Bayes classifier Introduction A Naive Bayes classifier is a simple probabilistic classifier based on the Bayes’ theorem along with some strong (naive) assumptions regarding the independence of features. Others...