January 2019
Intermediate to advanced
390 pages
9h 16m
English
The scikit-learn Naive Bayes module supports three Naive Bayes distributions. We can choose either of them depending on our input feature data type. The three Naive Bayes available in scikit-learn are as follows:
The wine data, as we have already seen, is a continuous data type. Hence, it will be good if we use Gaussian distribution for p(xi|Ck)—that is, the GaussianNB module, and so we'll add from sklearn.naive_bayes import GaussianNB in the import cell of the Notebook. You can read more details about the GaussianNB module from the is scikit-learn link: http://scikit-learn.org/stable/modules/generated/sklearn.naive_bayes.GaussianNB.html#sklearn.naive_bayes.GaussianNB ...
Read now
Unlock full access