Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ahmetozlu/4c7f7e5b152d872de5dee4a9c4799f7c to your computer and use it in GitHub Desktop.
Save ahmetozlu/4c7f7e5b152d872de5dee4a9c4799f7c to your computer and use it in GitHub Desktop.
# Plot actual vs prediction for training set
TestResults = numpy.genfromtxt("trainresults.csv", delimiter=",")
plt.plot(Y1,TestResults,'ro')
plt.title('Training Set')
plt.xlabel('Actual')
plt.ylabel('Predicted')
# Compute R-Square value for training set
TestR2Value = r2_score(Y1,TestResults)
print("Training Set R-Square=", TestR2Value)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment