Summary

In this chapter, we created a basic but useful e-mail subject line tester. This chapter provides a guide on how to code a basic Naïve Bayes classifier from scratch, without any external library, in order to demonstrate how easy it is to program a machine learning algorithm. We also defined a maximum size threshold for the training set and got an accuracy of 92 percent, which for this basic example is quite good.

In the following chapters, we will introduce more complex machine learning algorithms using the mlpy library and we will present how to extract more sophisticated features.

Get Practical Data Analysis - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.