Created
July 15, 2018 10:50
-
-
Save securetorobert/90dc5aa20b4e150632d1d3d0d26666e1 to your computer and use it in GitHub Desktop.
Predictions using DNNClassifier on iris dataset
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
# Predict the type of some Iris flowers. | |
# Let's predict the examples in FILE_TEST, repeat only once. | |
predict_results = classifier.predict( | |
input_fn=lambda: my_input_fn(FILE_TEST, False, 1)) | |
print("Predictions on test file") | |
for prediction in predict_results: | |
# Will print the predicted class, i.e: 0, 1, or 2 if the prediction | |
# is Iris Sentosa, Vericolor, Virginica, respectively. | |
print prediction["class_ids"][0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment