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 PCA-transformed features.
We will use K-fold cross validation to decide the number of principal components to use, according to the one-SE 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
acc_mean 1d numpy array Mean validation accuracy for each candidate model.
acc_se 1d numpy array Standard error of the mean of validation accuracy for each candidate model.
n_pca_opt integer Optimal number of components according to 'best mean validation accuracy' rule.
n_pca_one_se 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!