Uploaded by mly219933

EE-482 (Introduction to Artificial Intelligence) Assignment 1 - KNN

advertisement
EE-482 (Introduction to Artificial Intelligence)
Assignment 1 – 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”
References:
https://machinelearningmastery.com/k-fold-cross-validation/
https://scikit-learn.org/stable/modules/cross_validation.html
Download