In previous chapters, we introduced two models for classification tasks: k-Nearest Neighbors (KNN) and logistic regression. In this chapter, we will introduce another family of classifiers called Naive Bayes. Named for its use of Bayes' theorem and for its naive assumption that all features are conditionally independent of each other given the response variable, Naive Bayes is the first generative model that we will discuss. First, we will introduce Bayes' theorem. Next, we will compare generative and discriminative models. We will discuss Naive Bayes and its assumptions and examine its common variants. Finally, we will fit a model using scikit-learn.
Germany
Slovakia
Canada
Brazil
Singapore
Hungary
Philippines
Mexico
Thailand
Ukraine
Luxembourg
Estonia
Lithuania
Norway
Chile
United States
Great Britain
India
Spain
South Korea
Ecuador
Colombia
Taiwan
Switzerland
Indonesia
Cyprus
Denmark
Finland
Poland
Malta
Czechia
New Zealand
Austria
Turkey
France
Sweden
Italy
Egypt
Belgium
Portugal
Slovenia
Ireland
Romania
Greece
Argentina
Malaysia
South Africa
Netherlands
Bulgaria
Latvia
Australia
Japan
Russia