Answered step by step
Verified Expert Solution
Link Copied!

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 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions