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

Generating data

Now that we've gone through the process of searching for the right model, let's talk about what the model's true parameters were and how they line up with the parameters our regression generated.

This is the code that was used to generate the data:

import numpy as np variable_a = np.random.uniform(-100, 100, 30) variable_b = np.random.uniform(-5, 5, 30) variable_c = np.random.uniform(0, 37, 30) variable_d = np.random.uniform(121, 213, 30) variable_e = np.random.uniform(-1000, 100, 30) variable_f = np.random.uniform(-100, 100, 30) variable_g = np.random.uniform(-25, 75, 30) variable_h = np.random.uniform(1, 27, 30) independent_variables = zip(variable_a, variable_b, variable_c, variable_d, variable_e, variable_f, variable_g, variable_h) ...

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