Question: 5. Get Iris data set (Iris.csv) from here (https://www.kaggle.com/uciml/iris). Now answer the following question (write only piece of code that is necessary, not the full

5. Get Iris data set (Iris.csv) from here (https://www.kaggle.com/uciml/iris). Now answer the following question (write only piece of code that is necessary, not the full version)
Write a Python program using Scikit-learn to split the iris dataset into 80% train data and 20% test data. Out of total 150 records, the training set will contain 120 records and the test set contains 30 of those records. Train or fit the data into the
model and calculate the accuracy of the model using the K Nearest Neighbor Algorithm.

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!