Question: Problem #2: Test the KNN algorithm for predicting the cancer type on the cancer dataset. Two files wil be provided to you. One contains the

 Problem \#2: Test the KNN algorithm for predicting the cancer type

Problem \#2: Test the KNN algorithm for predicting the cancer type on the cancer dataset. Two files wil be provided to you. One contains the gene expression data for 20531 genes for 801 patients. The other file contains the class labels for the five types of cancer. Here is the code to read the data and convert the five categories of cancer into numeric values. The datafiles are available as a zip file on the course web site. Use 80% of the data for training and report the accuracy of detecting the correct cancer type using the KNN algorithm on the remaining 20% of the data

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!