Naive Bayes is a classification algorithm based on Bayes’ Theorem, with the assumption that the features are independent of each other (hence the term “Naive”). Bayes’ Theorem:P(Y∣X)= (P(X∣Y)⋅P(Y)/P(Y)) Where: Y: the class or category. X: the set of features or attributes. It calculates the probability of each class Y given the features X and selects the class with the highest probability.