Created
May 27, 2018 13:51
-
-
Save grohith327/0c65438acb7f43968e2b88d6f4cc636b 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
import matplotlib.pyplot as plt | |
y_prediction = a_0 + a_1 * x_test | |
print('R2 Score:',r2_score(y_test,y_prediction)) | |
y_plot = [] | |
for i in range(100): | |
y_plot.append(a_0 + a_1 * i) | |
plt.figure(figsize=(10,10)) | |
plt.scatter(x_test,y_test,color='red',label='GT') | |
plt.plot(range(len(y_plot)),y_plot,color='black',label = 'pred') | |
plt.legend() | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment