Created
January 22, 2019 14:51
-
-
Save holmesal/aff2cb7cb4061d3b49ede21e87a15a69 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
num_datapoints = 1000 | |
x = np.random.rand(num_datapoints) | |
# our model will guess m and b: | |
m = 7; | |
b = 13; | |
f = 2; | |
# high school flashbacks | |
y = m * x + b; | |
# randomly shift some datapoints up or down, to make it a little more interesting | |
y = y + np.random.normal(size=num_datapoints) * 0.5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment