O'Reilly logo

R Data Analysis Cookbook - Second Edition by Kuntal Ganguly

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How it works...

The Rotation contains the PC loading matrix that explains the proportion of each variable along each principal component.

With the dataset having only four PCs, the plot function shows that the first two PCs explain most of the variability in the data.

From the preceding biplot image, we can see the two PCs (PC1 and PC2) of the USArrests data, which represent how the feature space varies along the principal component vectors. The first principal component vector, PC1, more or less puts equal weight on three features, Rape, Assault, and Murder, indicating that these three features are more correlated with each other than the UrbanPop feature, whereas the second principal component, PC2, places extra weight on UrbanPop than ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required