778569 / KNN-for-iris-Flower-Machine-Learning-

Implementing K-Nearest Neighbors (KNN) algorithm for classifying iris flowers. Utilizes the popular iris dataset for training and testing. Python implementation with scikit-learn library. Educational and practical for beginners

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KNN-for-iris-Flower

Implementing K-Nearest Neighbors (KNN) algorithm for classifying iris flowers. Utilizes the popular iris dataset for training and testing. Python implementation with scikit-learn library. Educational and practical for beginners

DataSet information

68747470733a2f2f692e696d6775722e636f6d2f505171594761572e706e67

This is perhaps the best known database to be found in the pattern recognition literature. Fisher's paper is a classic in the field and is referenced frequently to this day. (See Duda & Hart, for example.) The data set contains 3 classes of 50 instances each, where each class refers to a type of iris plant. One class is linearly separable from the other 2; the latter are NOT linearly separable from each other.

  • Predicted attribute: class of iris plant.
  • This is an exceedingly simple domain.

This data differs from the data presented in Fishers article (identified by Steve Chadwick, spchadwick '@' espeedaz.net ). The 35th sample should be: 4.9,3.1,1.5,0.2,"Iris-setosa" where the error is in the fourth feature. The 38th sample: 4.9,3.6,1.4,0.1,"Iris-setosa" where the errors are in the second and third features.

Attribute Information:

  1. sepal length in cm
  2. sepal width in cm
  3. petal length in cm
  4. petal width in cm
  5. class: -- Iris Setosa -- Iris Versicolour -- Iris Virginica

image

How to change KNN to Support vector machine?

*just change to statement and check the accuracy

image

About

Implementing K-Nearest Neighbors (KNN) algorithm for classifying iris flowers. Utilizes the popular iris dataset for training and testing. Python implementation with scikit-learn library. Educational and practical for beginners


Languages

Language:Jupyter Notebook 100.0%