top of page

Naive Bayes classifiers (Two Classes) 

Conclusions

  •  Naive Bayes classifiers are based on Bayes theorem which assumes each feature is independent given that the class is known

  •  Discrete features are discontinuous, only a select number of values are possible. Continuous features can be measured on a scale and can be divided into smaller parts

  •  Naive Bayes classifiers require the following information to be known:

    •      The priors, or the probability of a class being assigned

    •     The likelihood, which is expressed by the probability mass function for discrete variables and the probability density function for continuous variables

  •  The posterior probability is equal to the likelihood times the priors divided by the prior probability of the predictor

  •  When a dataset has more than one feature, it is best to first combine the features into datapoints and then encode them using the OrdinalEncoder method. More information is available in the SciKit Learn User Guide https://scikit-learn.org/stable/modules/preprocessing.html#preprocessing-categorical-features

  •  After training a Naive Bayes Classifier, it can be used to predict the probability of a class being assigned given a new feature vector. In the example in this notebook, the classifier can predict the probability of a football match taking place given new weather and temperature data

bottom of page