Created
September 9, 2019 12:56
-
-
Save purva91/23f389a3234d31d58eaa7de3975fc0c0 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
plt.figure(figsize=(10,5)) | |
plt.xlabel('Different Values of K') | |
plt.ylabel('Model score') | |
plt.plot(k_vals, train_score, color = 'r', label = "training score") | |
plt.plot(k_vals, test_score, color = 'b', label = 'test score') | |
plt.legend(bbox_to_anchor=(1, 1), | |
bbox_transform=plt.gcf().transFigure) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment