Question: Import the iris data set from the datasets package and take a look at the columns. We would like to visualize the K - nearest

Import the iris data set from the datasets package and take a look at the columns. We would like to visualize the K
-nearest neighbor method in two dimensions, so make a data set called iris2 consisting of the columns relating to Sepal Width, Petal Width, and Species.
Create a data set train consisting of 60% of the data in iris2 and test consisting of the remaining 40% of the data. IMPORTANT: Make sure that each species is represented proportionally in the training set!

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!