Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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