quick look at the previous graph shows that the curve never goes down when we go from left to right in shortapplying the logarithm does not change the highest value solet us stick this into the formula we used earlierwe will use this to retrieve the formula for two features that will give us the best class for real-world data that we will see in practiceof coursewe will not be very successful with only two featuresso let us rewrite it to allow the arbitrary number of featuresthere we areready to use our first classifier from the scikit-learn toolkit creating our first classifier and tuning it the naive bayes classifiers reside in the sklearn naive_bayes package there are different kinds of naive bayes classifiersgaussiannbthis assumes the features to be normally distributed multinomialnbthis assumes the features to be occurrence countswhich is bernoullinbthis is similar to multinomialnbbut more suited when using binary word occurrences and not word counts (gaussianone use case for it could be the classification of sex according to the given height and width of person in our casewe are given tweet texts from which we extract word counts these are clearly not gaussian distributed relevant to us since we will be using word counts in the tweets as features in practicethis classifier also works well with tf-idf vectors as we will mainly look at the word occurrencesfor our purposemultinomialnb is best suited