Created
February 9, 2020 17:56
-
-
Save clementpoiret/f21bb90e784407362fbabab327ce0c95 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
# Showing data, alongside prediction | |
x = np.linspace(0, 2, 10).reshape(-1, 1) | |
y_truth = gradient * x + w0 | |
y_estimated = model.coef_ * x + model.intercept_ | |
plt.scatter(X_train, y_train, label="Data") | |
plt.plot(x, y_truth, label="Truth") | |
plt.plot(x, y_estimated, label="Model") | |
plt.legend(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment