Skip to content

Instantly share code, notes, and snippets.

@gonzaloruizdevilla
Created October 16, 2019 19:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gonzaloruizdevilla/0e2c985187c305ce28dd04db2e07f72c to your computer and use it in GitHub Desktop.
Save gonzaloruizdevilla/0e2c985187c305ce28dd04db2e07f72c to your computer and use it in GitHub Desktop.
prediction = knn.predict(X_new)
print("Prediction: {}".format(prediction))
print("Predicted target name: {}".format(iris_dataset['target_names'][prediction]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment