Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Test Driven Machine Learning

You're reading from  Test Driven Machine Learning

Product type Book
Published in Nov 2015
Publisher
ISBN-13 9781784399085
Pages 190 pages
Edition 1st Edition
Languages

Table of Contents (16) Chapters

Test-Driven Machine Learning
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Introducing Test-Driven Machine Learning 2. Perceptively Testing a Perceptron 3. Exploring the Unknown with Multi-armed Bandits 4. Predicting Values with Regression 5. Making Decisions Black and White with Logistic Regression 6. You're So Naïve, Bayes 7. Optimizing by Choosing a New Algorithm 8. Exploring scikit-learn Test First 9. Bringing It All Together Index

Upgrading to Random Forest


We did a lot of great work in building up the classifier. Naïve Bayes, while usually not a bad choice, is typically never the best choice of classifier. Next, we'll try comparing its performance to an algorithm that is usually a great choice: Random Forest. Unlike the Naïve Bayes algorithm, we won't be implementing this by hand.

The reason has very little to do with the complication and more to do with the fact that it's better practice to avoid the leg work and the time cost of rolling your own algorithms by hand. A lot of sections in this book have covered how to roll your own algorithms in a test-driven manner, so you have the tools to do so if need be. The rest of this book will cover more of a test-driven approach in using the third-party libraries.

To get started, we can build a wrapper class around sklearn's functionality so that we can keep the same interface that we already have, but leverage the power of a third-party library. We should start with the same...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}