Skip to main content

The Multinomial Naïve Bayes Prediction Function

  • Chapter
  • First Online:
Algorithms for Data Science

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 99.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Standard practice is to omit very common words such as prepositions and pronouns from W.

  2. 2.

    After having seen the data.

  3. 3.

    A sub-area of linguistics devoted to using machines to extract information from text.

  4. 4.

    The disputed papers are in fact the targets though we’ve used an ownership list that attributes authorship to all 85 papers.

  5. 5.

    Stop-words are excluded.

  6. 6.

    If so, then the non-members may be offered segment-specific information and incentives.

  7. 7.

    We used the function in instruction of 3 of the Sect. 10.5 tutorial.

  8. 8.

    The UPS code 1070080727 is a barcode symbol that specifically identifies the item.

References

  1. D. Adair, The authorship of the disputed federalist papers. William Mary Q. 1 (2), 97–122 (1944)

    Article  Google Scholar 

  2. S. Bird, E. Klein, E. Loper, Natural Language Processing with Python (O’Reilly Media, Sebastopol, 2009)

    MATH  Google Scholar 

  3. F. Mosteller, D.L. Wallace, Inference in an authorship problem. J. Am. Stat. Assoc. 58 (302), 275–309 (1963)

    MATH  Google Scholar 

  4. Project Gutenberg, https://www.gutenberg.org/. Accessed 7 June 2016

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics