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

The real world


Now that we have this harness built that can make recommendations on the customers that we should advertise to, we need to think about the kind of algorithms that we want to plug in it. For the probability of a customer placing an order, we can use Logistic Regression or Naïve Bayes. To estimate how much money the customer might spend, we can use (depending on our data) Gaussian Naïve Bayes or Linear Regression.

To start off with, let's use Linear Regression and Logistic Regression. The main purpose of doing this is to use more sklearn as, if we do, we won't have to spend time building the algorithms ourselves.

When we begin, it may be helpful to create a test file just to explore sklearn like in the previous chapter. We already have some generated data at https://github.com/jcbozonier/Machine-Learning-Test-by-Test/blob/master/Chapter%209/fake_data.json.

The Logistic Regression model in sklearn is only helpful if we can use it to get at the probability that someone will order...

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}