K-Nearest Neighbors on Wisconsin Breast Cancer Data
First, let's set things up in R by loading the necessary package and importing the data into R. the class package will be used to run the k-nearest neighbors algorithm. We will also use a specific seed so that you can reproduce this in R yourself. Importing the data, let's take a look at the basic structure of the dataset. The first variable, id, is there simply as a unique identifier for each observation. We will take it out for the purposes of our analysis.
Apr-9-2017, 04:33:11 GMT
- Country:
- North America > United States > Wisconsin (0.40)
- Industry:
- Health & Medicine > Therapeutic Area > Oncology > Breast Cancer (0.40)