Answered step by step
Verified Expert Solution
Question
1 Approved Answer
a dataset of samples from just cerebellum and hippocampus, two parts of the brain, and a predictor matrix with 10 randomly selected columns using the
a dataset of samples from just cerebellum and hippocampus, two parts of the brain, and a predictor matrix with 10 randomly selected columns using the following code:
library(dslabs) library(caret) library(tidyverse) data("tissue_gene_expression") set.seed(1993) #if using R 3.6 or later set.seed(1993, sample.kind="Rounding") ind <- which(tissue_gene_expression$y %in% c("cerebellum", "hippocampus")) y <- droplevels(tissue_gene_expression$y[ind]) x <- tissue_gene_expression$x[ind, ] x <- x[, sample(ncol(x), 10)]
Use thetrain()function to estimate the accuracy of LDA. For this question, use the version oftissue_gene_expressioncreated with the code above: do not split it into training and test sets (understand this can lead to overfitting). Report the accuracy from thetrain()results (do not make predictions).
What is the accuracy?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started