Created
October 26, 2021 15:28
-
-
Save michelkana/1cf8263c97f317380f69be8ff0645685 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
r2df = pd.DataFrame(r2_scores, columns=["k", "train_data_score", "test_data_score"]) | |
f, ax = plt.subplots(1, 1, figsize=(30,5)) | |
ax.scatter(r2df.k, r2df.train_data_score, label='Train data score') | |
ax.scatter(r2df.k, r2df.test_data_score, color='r', label='Test data score') | |
plt.xticks(r2df.k) | |
plt.legend() | |
plt.xlabel('k values') | |
plt.ylabel(r'$R^2$') | |
plt.grid(False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment