Skip to Main Content
Test-Driven Machine Learning
book

Test-Driven Machine Learning

by Justin Bozonier
November 2015
Intermediate to advanced content levelIntermediate to advanced
190 pages
4h 11m
English
Packt Publishing
Content preview from Test-Driven Machine Learning

Chapter 7. Optimizing by Choosing a New Algorithm

In this chapter, we'll dig into the heart of the problem that we have been preparing to solve—predicting which gender someone is from their height, weight, and BMI. We have built a N-class Gaussian Naïve Bayes classifier, but it only works on one dimension. This problem will require one addition of making our classifier support three dimensions. It may be tempting to modify it to support an arbitrary number of dimensions, but right now there wouldn't be any value to it. What's more, hard coding our class to work for three-dimensional input may help us save some time.

After this, we'll replace our custom classifier with a Random Forest classifier from scikit-learn. From there, we'll compare performance ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Machine Learning in Action

Machine Learning in Action

Peter Harrington

Publisher Resources

ISBN: 9781784399085Supplemental Content