There are no reviews yet. Be the first to send feedback to the community and the maintainers!
Repository Details
In this project, I will implement the k-NN classification algorithm and test it on the Iris dataset. k-NN classification method have two input parameters: Number of Neighbors(k), Distance Metric(Euclidean or Manhattan distance) Iris dataset contains three flowers and each flower is represented by four features: 1=sepal length, 2=sepal width, 3=petal length, and 4=petal width. In this assignment, I used the first and the fourth feature dimensions. I put first 30 samples from each flower class into the training set 20 samples into the test set. I organize iris data and change iris names with 0,1,2. Then I estimate distances between test set and training set and find minimum distances as k number and find its index to find which samples are closest. Then I find iris names and estimate accuracy rate.