Implementation of the Naive Bayes classifier in Python