we can now make predictions using this model on new data for which we might not know the correct labels imagine we found an iris in the wild with sepal length of cma sepal width of cma petal length of cmand petal width of cm what species of iris would this bewe can put this data into numpy arrayagain by calculating the shape--that isthe number of samples ( multiplied by the number of features ( )in[ ]x_new np array([[ ]]print("x_new shape{}format(x_new shape)out[ ]x_new shape( note that we made the measurements of this single flower into row in twodimensional numpy arrayas scikit-learn always expects two-dimensional arrays for the data to make predictionwe call the predict method of the knn objectin[ ]prediction knn predict(x_newprint("prediction{}format(prediction)print("predicted target name{}formatiris_dataset['target_names'][prediction])out[ ]prediction[ predicted target name['setosa'our model predicts that this new iris belongs to the class meaning its species is setosa but how do we know whether we can trust our modelwe don' know the correct species of this samplewhich is the whole point of building the modelevaluating the model this is where the test set that we created earlier comes in this data was not used to build the modelbut we do know what the correct species is for each iris in the test set thereforewe can make prediction for each iris in the test data and compare it against its label (the known specieswe can measure how well the model works by computing the accuracywhich is the fraction of flowers for which the right species was predicted introduction