Question: For this assignment, you have to classify the Iris flowers based on the provided sepal and petal features in the Iris dataset using KNN .

For this assignment, you have to classify the Iris flowers based on the provided sepal and petal features in the Iris dataset using KNN. There are 50 samples for each of the three classes. Split the data into 80% - 20% training - testing samples for each class to do a 5-fold cross validation.

Try different values of K (e.g. 1, 3, 5, 7 -----) and different distances (L1 and L2).

Report what value of K and distance metric (L1/L2) gives the best results in terms of Accuracy

use python

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!