Question: PCA ( or any other unsupervised dimensionality reduction ) can be used to transform data before fitting a supervised learning model. In this problem, we
PCA or any other unsupervised dimensionality reduction can be used to transform data before fitting a supervised learning model. In this problem, we will apply PCA for dimensionality reduction, then use a support vector classifier fitted on a subset of the PCAtransformed features.
We will use Kfold cross validation to decide the number of principal components to use, according to the oneSE rule.
In this workspace, write code to split the data into training and test sets, and perform the analysis described above on the training set.
Name Type Description
accmean d numpy array Mean validation accuracy for each candidate model.
accse d numpy array Standard error of the mean of validation accuracy for each candidate model.
npcaopt integer Optimal number of components according to 'best mean validation accuracy' rule.
npcaonese integer Optimal number of components according to 'one SE rule.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
