Question: Organize responses in an Rmd file 1. Install / load the gclus library and run data (wine) to load the 13-variable Italian red wine data
Organize responses in an Rmd file

1. Install / load the gclus library and run data (wine) to load the 13-variable Italian red wine data set. (a) Perform principal component analysis using the preamp function on the scaled numeric predictors (everything but \"Class\"). Provide a summary of the prcomp object and a biplot. (b) How many principal components should be kept... i. according to the Kaiser criterion? (optional). Since we didn't really talk about this one in lecture feel free to skip. It is however not hard to do once you realize that the A that is referenced are the eigenvalues which are found using the following code: pea. out$sdev'2 ii. if we wish to retain at least 90% of the variance in the data? iii. according to the scree plot? (c) Retain the components suggested by the scree plot, and perform LDA (with built-in leave-oneout cross-validation) for the wine \"Class\" using the retained scores as the predictors. What is the cross-validated logloss of this model
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
