Skip to content

Instantly share code, notes, and snippets.

@hucodelab
Created April 30, 2022 04:10
Show Gist options
  • Select an option

  • Save hucodelab/3d423838c976b7547dc78e9b51f9dc20 to your computer and use it in GitHub Desktop.

Select an option

Save hucodelab/3d423838c976b7547dc78e9b51f9dc20 to your computer and use it in GitHub Desktop.
# let's see the test accuracy
for k, v in test_accuracy.items():
print("test accuracy for {} n_neighbors is {} %".format(k,round(v*100,3)))
test accuracy for 1 n_neighbors is 94.406 %
test accuracy for 5 n_neighbors is 95.804 %
test accuracy for 10 n_neighbors is 95.105 %
test accuracy for 20 n_neighbors is 96.503 %
test accuracy for 50 n_neighbors is 93.007 %
test accuracy for 100 n_neighbors is 93.706 %
# let's see the train accuracy
for k, v in train_accuracy.items():
print("train accuracy for {} n_neighbors is {} %".format(k,round(v*100,3)))
train accuracy for 1 n_neighbors is 100.0 %
train accuracy for 5 n_neighbors is 94.366 %
train accuracy for 10 n_neighbors is 93.192 %
train accuracy for 20 n_neighbors is 92.488 %
train accuracy for 50 n_neighbors is 90.845 %
train accuracy for 100 n_neighbors is 90.376 %
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment