y_pred knn predict(x_testprint("test set predictions:\ {}format(y_pred)out[ ]test set predictions[ in[ ]print("test set score{ }format(np mean(y_pred =y_test))out[ ]test set score we can also use the score method of the knn objectwhich will compute the test set accuracy for usin[ ]print("test set score{ }format(knn score(x_testy_test))out[ ]test set score for this modelthe test set accuracy is about which means we made the right prediction for of the irises in the test set under some mathematical assumptionsthis means that we can expect our model to be correct of the time for new irises for our hobby botanist applicationthis high level of accuracy means that our model may be trustworthy enough to use in later we will discuss how we can improve performanceand what caveats there are in tuning model summary and outlook let' summarize what we learned in this we started with brief introduction to machine learning and its applicationsthen discussed the distinction between supervised and unsupervised learning and gave an overview of the tools we'll be using in this book thenwe formulated the task of predicting which species of iris particular flower belongs to by using physical measurements of the flower we used dataset of measurements that was annotated by an expert with the correct species to build our modelmaking this supervised learning task there were three possible speciessetosaversicoloror virginicawhich made the task three-class classification problem the possible species are called classes in the classification problemand the species of single iris is called its label the iris dataset consists of two numpy arraysone containing the datawhich is referred to as in scikit-learnand one containing the correct or desired outputssummary and outlook