Skip to content

Instantly share code, notes, and snippets.

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