Login using Social Account
     Continue with GoogleLogin using your credentials
Finally, we will view the predictions for the first few samples.
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])
Want to create exercises like this yourself? Click here.
Note - Having trouble with the assessment engine? Follow the steps listed here
Loading comments...