Abstract
The naïve Bayes prediction function is a computationally and conceptually simple algorithm. While the performance of the algorithm generally is not best among competitors when the predictor variables are quantitative, it does well with categorical predictor variables, and it’s especially well-suited for categorical predictor variables with many categories. In this chapter we develop the multinomial naïve Bayes prediction function, the incarnation of naïve Bayes for categorical predictors. We develop the function from its mathematical foundation before applying it to two very different problems: predicting the authorship of the Federalist Papers and a problem from the business marketing domain—classifying shoppers based on their grocery store purchases. The Federalist Papers application provides the opportunity to work with textual data.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Standard practice is to omit very common words such as prepositions and pronouns from W.
- 2.
After having seen the data.
- 3.
A sub-area of linguistics devoted to using machines to extract information from text.
- 4.
The disputed papers are in fact the targets though we’ve used an ownership list that attributes authorship to all 85 papers.
- 5.
Stop-words are excluded.
- 6.
If so, then the non-members may be offered segment-specific information and incentives.
- 7.
We used the function in instruction of 3 of the Sect. 10.5 tutorial.
- 8.
The UPS code 1070080727 is a barcode symbol that specifically identifies the item.
References
D. Adair, The authorship of the disputed federalist papers. William Mary Q. 1 (2), 97–122 (1944)
S. Bird, E. Klein, E. Loper, Natural Language Processing with Python (O’Reilly Media, Sebastopol, 2009)
F. Mosteller, D.L. Wallace, Inference in an authorship problem. J. Am. Stat. Assoc. 58 (302), 275–309 (1963)
Project Gutenberg, https://www.gutenberg.org/. Accessed 7 June 2016
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2016 Springer International Publishing Switzerland
About this chapter
Cite this chapter
Steele, B., Chandler, J., Reddy, S. (2016). The Multinomial Naïve Bayes Prediction Function. In: Algorithms for Data Science. Springer, Cham. https://doi.org/10.1007/978-3-319-45797-0_10
Download citation
DOI: https://doi.org/10.1007/978-3-319-45797-0_10
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-45795-6
Online ISBN: 978-3-319-45797-0
eBook Packages: Computer ScienceComputer Science (R0)