O'Reilly logo

Test-Driven Machine Learning by Justin Bozonier

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required