Skip to content

Instantly share code, notes, and snippets.

@clementpoiret
Last active February 9, 2020 18:04
Show Gist options
  • Save clementpoiret/51cebc40eca5de1593d4096ff77a982f to your computer and use it in GitHub Desktop.
Save clementpoiret/51cebc40eca5de1593d4096ff77a982f to your computer and use it in GitHub Desktop.
# Real Parameters
gradient = 0.5
w0 = 1
# Data synthesis
X_train = 2 * np.random.random_sample((20, 1))
y_train = gradient * X_train + w0 + 0.1 * np.random.random_sample((20, 1))
# Plot
plt.scatter(X_train, y_train);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment