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

Unlock the full course today

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

Solution: PCA

Solution: PCA

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

Start my 1-month free trial

Solution: PCA

(upbeat music) - [Narrator] In the previous video, I invited you to do dimensionality reduction with principal component analysis on one of our's, built-in datasets the swiss data set. I'm going to be using the code based off of the principle components demonstration we had earlier. To do this am going to load a few packages, car for the scatterplot matrix, dataset which is where the data set is and gg biplot in addition to the other ones that I load every time. So let me begin by loading those packages. And then we'll take a quick look at the Swiss dataset. Again, it's 47 observations from the 1880s on six variables. And the idea is to see if these variables can be collapsed into a smaller number of dimensions. I'm going to begin by importing the Swiss dataset as a tibble, that's an enhanced data frame that prints a little better and saving it as DF. That's how I usually save things. It stands for data frame, and then…

Contents