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


Problem \#2: Test the KNN algorithm for predicting the cancer type on the cancer dataset. Two files will 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
Get step-by-step solutions from verified subject matter experts
