Last active
December 27, 2019 16:39
-
-
Save edenau/864dfdc77ee07e687f36f41203ea8332 to your computer and use it in GitHub Desktop.
This file contains 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
# Make sure X and y are linearly correlated with normally distributed noise | |
n = 10000 # 10000 datum points | |
X = np.random.uniform(-10,10, n) | |
noise = np.random.normal(0, 3, n) # Gaussian distribution | |
true_w, true_b = 7.6, -3.3 | |
y = true_w * X + true_b + noise # y = w * x + b + ε |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment