Halloween Sale: Flat 70% + Addl. 25% Off + 30 Days Extra Lab on all Courses | Use Coupon HS25 in Checkout | Offer Expires In

  Enroll Now

Keras Project - Iris Flower Identification - View the Predictions

Finally, we will view the predictions for the first few samples.

INSTRUCTIONS
  • Save the target names into the class_names variable

    << your code goes here >> = iris.target_names
    
  • Get the features for the first 5 test samples

    X_new = X_test[:<< your code goes here >>]
    
  • Predict the classes for the 5 samples

    y_pred = model.predict_classes(X_new)
    print(np.array(class_names)[y_pred])
    
  • Get the class names of the first 5 samples from the test variable

    y_new = y_test[:<< your code goes here >>]
    print(np.array(class_names)[y_new])
    

No hints are availble for this assesment

Answer is not availble for this assesment


Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...