From the course: Data Science Foundations: Data Mining in Python

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Challenge: PCA

Challenge: PCA - Python Tutorial

From the course: Data Science Foundations: Data Mining in Python

Start my 1-month free trial

Challenge: PCA

(upbeat music) - Now that we've gone through several algorithms for dimensionality reduction, I want you to have a chance to do a little hands-on work with this, doing a challenge in PCA, or principal component analysis. For this, I'm going to ask you to set up a PCA object, project the data onto those dimensions, plot the ratio of variances and then get a scatterplot of the projected data along the first two principal directions. This mirrors what we did in the PCA demonstration. Now to do this, I'm going to introduce you to a dataset that's called Swiss. This is a well-known dataset. It comes from census data of a sort from 1888 in Switzerland. It gives standardized fertility measure and socioeconomic indicators for 47 French speaking provinces in Switzerland, again in 1888. And we're going to use this complete data set as opposed to separating it into training and testing. I've saved it as a CSV file in our data…

Contents