MENU

Fun & Interesting

StatQuest: PCA in Python

StatQuest with Josh Starmer 213,870 lượt xem 7 years ago
Video Not Working? Fix It Now

You asked for it, you got it! Now I walk you through how to do PCA in Python, step-by-step. It's not too bad, and I'll show you how to generate test data, do the analysis, draw fancy graphs and interpret the results. If you want to download the code, here's the link to the StatQuest GitHub:
https://github.com/StatQuest/pca_demo/blob/master/pca_demo.py

For a complete index of all the StatQuest videos, check out:
https://statquest.org/video-index/

If you'd like to support StatQuest, please consider...

Patreon: https://www.patreon.com/statquest
...or...
YouTube Membership: https://www.youtube.com/channel/UCtYLUTtgS3k1Fg4y5tAhLbw/join

...buying one of my books, a study guide, a t-shirt or hoodie, or a song from the StatQuest store...
https://statquest.org/statquest-store/

...or just donating to StatQuest!
https://www.paypal.me/statquest

Lastly, if you want to keep up with me as I research and create new StatQuests, follow me on twitter:
https://twitter.com/joshuastarmer

0:00 Awesome song and introduction
1:06 Load modules and generate data
5:03 Scaling and centering data
7:31 Use scikit for PCA
8:34 Draw a scree plot
9:18 Draw a PCA plot
10:18 Examine the loading scores

Correction:
3:23 The array should only have wt through wt5, ko1 through ko5.

#statquest #PCA

Comment