Created
November 28, 2017 15:31
-
-
Save nmolivo/8613bc758c21042c333ee581a59a7f15 to your computer and use it in GitHub Desktop.
Attempt to calculate an R^2 score for LOOCV using cross_val_score
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
scores = cross_val_score(LinearRegression(), Xr, yr, cv=397, scoring = "r2") | |
print("Cross-validated scores:", scores) | |
print("Average: ", scores.mean()) | |
print("Variance: ", np.std(scores)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment