Book Image

Test Driven Machine Learning

Book Image

Test Driven Machine Learning

Overview of this book

Table of Contents (16 chapters)
Test-Driven Machine Learning
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
2
Perceptively Testing a Perceptron
Index

Chapter 6. You're So Naïve, Bayes

We've all seen examples of using Naïve Bayes classifiers in a way of classifying text. The applications include spam detection, sentiment analysis, and more. In this chapter, we're going to take a road that is less traveled. We will build a Naïve Bayes classifier that can take in continuous inputs and classify them. Specifically, we'll build a Gaussian Naïve Bayes classifier to classify which state a person is from, which will be based on the person's height, weight, and BMI.

This chapter will work a bit differently from the previous ones. Here, we'll develop an N-class Gaussian Naïve Bayes classifier to fit our use case (the data at hand). In the next chapter, we'll pull in some of this data to train with, and then we'll analyze the quality of our model to see how we did it. In the previous chapters, we used generated data so that we could make sure that the classifiers built by us were operating according to their assumptions. In this chapter, we'll spend...