For This Quiz We Will Be Using Several R Packages. R Package Versions Change Over Time, The Right Answers Have Been Checked Using The Following Versions Of The Packages. AppliedPredictiveModeling: V1.1.6caret: V6.0.47ElemStatLearn: V2012.04-0pgmm: V1.1rpart: V4.1.8If You Aren't Using These Versions Of The Packages, Your Answers May Not Exactly Match The Right Answer, But Hopefully Should Be Close. Load The Cell Segmentation Data From The AppliedPredictiveModeling Package Using The Commands: Library(AppliedPredictiveModeling)data(segmentationOriginal)library(caret)1. Subset The Data To A Training Set And Testing Set Based On The Case Variable In The Data Set. 2. Set The Seed To 125 And Fit A CART Model With The Rpart Method Using All Predictor Variables And Default Caret Settings. 3. In The Final Model What Would Be The Final Model Prediction For Cases With The Following Variable Values:a. TotalIntench2 = 23,000; FiberWidthCh1 = 10; PerimStatusCh1=2 B. TotalIntench2 = 50,000; FiberWidthCh1 = 10;VarIntenCh4 = 100 C. TotalIntench2 = 57,000; FiberWidthCh1 = 8;VarIntenCh4 = 100 D. FiberWidthCh1 = 8;VarIntenCh4 = 100; PerimStatusCh1=2 » Re⥃askly

For this quiz we will be using several R packages. R package versions change over time, the right answers have been checked using the following versions of the packages.
AppliedPredictiveModeling: v1.1.6
caret: v6.0.47
ElemStatLearn: v2012.04-0
pgmm: v1.1
rpart: v4.1.8
If you aren't using these versions of the packages, your answers may not exactly match the right answer, but hopefully should be close.
Load the cell segmentation data from the AppliedPredictiveModeling package using the commands:

1. Subset the data to a training set and testing set based on the Case variable in the data set.
2. Set the seed to 125 and fit a CART model with the rpart method using all predictor variables and default caret settings.
3. In the final model what would be the final model prediction for cases with the following variable values:
a. TotalIntench2 = 23,000; FiberWidthCh1 = 10; PerimStatusCh1=2
b. TotalIntench2 = 50,000; FiberWidthCh1 = 10;VarIntenCh4 = 100
c. TotalIntench2 = 57,000; FiberWidthCh1 = 8;VarIntenCh4 = 100
d. FiberWidthCh1 = 8;VarIntenCh4 = 100; PerimStatusCh1=2

Home » For this quiz we will be using several R packages. R package versions change over time, the right answers have been checked using the following versions of the packages.
AppliedPredictiveModeling: v1.1.6caret: v6.0.47ElemStatLearn: v2012.04-0pgmm: v1.1rpart: v4.1.8If you aren’t using these versions of the packages, your answers may not exactly match the right answer, but hopefully should be close. Load the cell segmentation data from the AppliedPredictiveModeling package using the commands: library(AppliedPredictiveModeling)data(segmentationOriginal)library(caret)1. Subset the data to a training set and testing set based on the Case variable in the data set. 2. Set the seed to 125 and fit a CART model with the rpart method using all predictor variables and default caret settings. 3. In the final model what would be the final model prediction for cases with the following variable values:a. TotalIntench2 = 23,000; FiberWidthCh1 = 10; PerimStatusCh1=2 b. TotalIntench2 = 50,000; FiberWidthCh1 = 10;VarIntenCh4 = 100 c. TotalIntench2 = 57,000; FiberWidthCh1 = 8;VarIntenCh4 = 100 d. FiberWidthCh1 = 8;VarIntenCh4 = 100; PerimStatusCh1=2

For this quiz we will be using several R packages. R package versions change over time, the right answers have been checked using the following versions of the packages.
AppliedPredictiveModeling: v1.1.6caret: v6.0.47ElemStatLearn: v2012.04-0pgmm: v1.1rpart: v4.1.8If you aren’t using these versions of the packages, your answers may not exactly match the right answer, but hopefully should be close. Load the cell segmentation data from the AppliedPredictiveModeling package using the commands: library(AppliedPredictiveModeling)data(segmentationOriginal)library(caret)1. Subset the data to a training set and testing set based on the Case variable in the data set. 2. Set the seed to 125 and fit a CART model with the rpart method using all predictor variables and default caret settings. 3. In the final model what would be the final model prediction for cases with the following variable values:a. TotalIntench2 = 23,000; FiberWidthCh1 = 10; PerimStatusCh1=2 b. TotalIntench2 = 50,000; FiberWidthCh1 = 10;VarIntenCh4 = 100 c. TotalIntench2 = 57,000; FiberWidthCh1 = 8;VarIntenCh4 = 100 d. FiberWidthCh1 = 8;VarIntenCh4 = 100; PerimStatusCh1=2

If K is small in a K-fold cross validation is the bias in the estimate of out-of-sample (test set) accuracy smaller or bigger? If K is small is the variance in the estimate of out-of-sample (test set) accuracy smaller or bigger. Is K large or small in leave one out cross validation?

Load the olive oil data using the commands:
library(pgmm)data(olive)olive = olive[,-1](NOTE: If you have trouble installing the pgmm package, you can download the -code-olive-/code- dataset here: olive_data.zip. After unzipping the archive, you can load the file using the -code-load()-/code- function in R.)These data contain information on 572 different Italian olive oils from multiple regions in Italy. Fit a classification tree where Area is the outcome variable. Then predict the value of area for the following data frame using the tree command with all defaultsnewdata = as.data.frame(t(colMeans(olive)))What is the resulting prediction? Is the resulting prediction strange? Why or why not?

Load the South Africa Heart Disease Data and create training and test sets with the following code:
library(ElemStatLearn)data(SAheart)set.seed(8484)train = sample(1:dim(SAheart)[1],size=dim(SAheart)[1]/2,replace=F)trainSA = SAheart[train,]testSA = SAheart[-train,]Then set the seed to 13234 and fit a logistic regression model (method=”glm”, be sure to specify family=”binomial”) with Coronary Heart Disease (chd) as the outcome and age at onset, current alcohol consumption, obesity levels, cumulative tabacco, type-A behavior, and low density lipoprotein cholesterol as predictors. Calculate the misclassification rate for your model using this function and a prediction on the “response” scale:missClass = function(values,prediction){sum(((prediction > 0.5)*1) != values)/length(values)}What is the misclassification rate on the training set? What is the misclassification rate on the test set?