Q7 11 point graded use the train function with knn to

This preview shows page 5 - 7 out of 7 pages.

Q71/1 point (graded)Use the trainfunction with kNN to select the best kfor predicting tissue from geneexpression on the tissue_gene_expressiondataset from dslabs. Try k = seq(1,7,2)for tuning parameters. For this question, do not split the data into test and train sets(understand this can lead to over±tting, but ignore this for now).What value of kresults in the highest accuracy?1SubmitYou have used 1 of 10 attemptsAsk your questions or make your comments about Cross-validation here!Remember,one of the best ways to reinforce your own learning is by explaining something tosomeone else, so we encourage you to answer each other's questions (withoutgiving away the answers, of course).Some reminders:The function trainestimates accuracy on the same data it uses to train thealgorithm.We are over±tting the model by including 100 predictors.We used the entire dataset to select the columns used in the model.The high accuracy is just due to random variability.
Search the discussion board before posting to see if someone else has asked thesame thing before asking a new question.Please be speci±c in the title and body of your post regarding which questionyou're asking about to facilitate answering your question.Posting snippets of code is okay, but posting full code solutions is not.If you do post snippets of code, please format it as code for readability. If you'renot sure how to do this, there are instructions in a pinned post in the "general"discussion forum.

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture