Principal Component Analysis (PCA)

Sdílet
Vložit
  • čas přidán 15. 06. 2024
  • This video is gentle and motivated introduction to Principal Component Analysis (PCA). We use PCA to analyze the 2021 World Happiness Report published 2021 and discover what makes countries truly happy. :)
    References:
    - Scikit-Learn User Guide : scikit-learn.org/stable/modul...
    - A Tutorial on Principal Component Analysis: arxiv.org/abs/1404.1100
    - Andrew Ng Stanford Course: • Lecture 14 | Machine L...
    - Kaggle dataset: www.kaggle.com/ajaypalsinghlo...
    --------------------------
    Timestamps:
    0:00 Intro
    1:37 Projecting a point on a line
    2:00 Optimization
    3:27 First component
    4:19 Second component
    5:20 More generally ...
    --------------------------
    Credit:
    🐍 Manim and Python : github.com/3b1b/manim
    🐵 Blender3D: www.blender.org/
    🗒️ Emacs: www.gnu.org/software/emacs/
    🎹 Intro Music: Waltz of the Flowers - Tchaikovsky
    🎹 Outro Music: Like That - Anno Domini Beats
    This video would not have been possible without the help of Gökçe Dayanıklı.
  • Věda a technologie

Komentáře • 95

  • @andreabonvini
    @andreabonvini Před rokem +103

    Finally someone that actually derives the PCA without just reporting the algorithm, great work!

  • @linusisu
    @linusisu Před 2 měsíci +3

    Extraordinary Video! I will show this to my students in all my linear algebra classes. One very minor comment: it is worth mentioning that your data is centered before beginning your analysis. That is, each column vector has it mean subtracted. That is why, C (as you defined), is a covariance matrix.

  • @631kw
    @631kw Před 2 lety +28

    A well-designed animation surpasses thousand words!

  • @kalathiyasmitmukeshbhai2178

    i am very thankful that i found your video.
    i was learning PCA but wasn't able to imagine in the 3d space but you explained it really well.
    kudos to you mate.

  • @rezahomam7454
    @rezahomam7454 Před rokem +3

    That is an absolute masterpiece. Thank you for your plain, visualizing video.

  • @timng9104
    @timng9104 Před rokem +5

    PCA is like 'magic', never really understood it but it is so useful! thanks for the great video.

  • @samiswilf
    @samiswilf Před rokem

    Best video on PCA I've seen out the hundreds

  • @StevenFrancis667
    @StevenFrancis667 Před rokem +1

    just wanted to thank you brother for this hard work! best explanations! saving me in grad school right now!

  • @anjishnu8643
    @anjishnu8643 Před 2 lety +16

    Really well explained and amazing visualizations! Thanks.

  • @GeorgeZoto
    @GeorgeZoto Před rokem +1

    Awesome visual and intuitive way to explain PCA, loved the graphics too :)

  • @gj1hj6013
    @gj1hj6013 Před rokem

    Super informative and so eloquently explained! Thankyou so much!

  • @shenglifan6487
    @shenglifan6487 Před rokem

    amazingly clear explanation of PCA!

  • @jayantnema9610
    @jayantnema9610 Před rokem

    dude! what an amazing channel! Super underrated man

  • @user-uf7ql4it7q
    @user-uf7ql4it7q Před 8 měsíci

    such a clearly explanation for PCA! Giving the example really helps a lot to understand the meaning and how to use it.

  • @laurielgm
    @laurielgm Před 6 měsíci

    Awesome!!! Thank you so much! It's so fun to watch and so well explained!

  • @findclue
    @findclue Před 3 měsíci

    This video is very good! I like how you labeled the first component as "power". I think it is important to clarify that PCA loses the distinction of original features unless you keep all the principal components, and this new labeling explains this very well.

  • @ashaswathi
    @ashaswathi Před 7 měsíci

    Absolutely loved the explanation

  • @dragnar4743
    @dragnar4743 Před 7 měsíci

    Wow, simplified the entire concept of PCA. And also I love the example u gave. Thnx for the vid 💛🧡

  • @Mohammed-hr9th
    @Mohammed-hr9th Před 4 měsíci

    Perfectly explained.

  • @pietro452
    @pietro452 Před 11 měsíci

    Best video out here about PCA!

  • @akoredeadebayo4269
    @akoredeadebayo4269 Před rokem

    Thank you, the video was fun to watch with clear explanations

  • @rubenfranciscoarterobanare4862

    Nice explanation simple fast and efective, good job with the example and the edition too

  • @amrithagk4477
    @amrithagk4477 Před 10 měsíci

    Amazing explanation! Thank you

  • @sudhenduahir802
    @sudhenduahir802 Před 2 lety +3

    Very well put in such a short time.. conveyed the essence very well.. I'll go ahead and subscribe to you..
    Keep up the awesome work..

  • @ad_koishi3266
    @ad_koishi3266 Před rokem +1

    awesome animations!!! Thanks so much!

  • @suheladesilva2933
    @suheladesilva2933 Před 5 měsíci

    Brilliant video, thanks very much.

  • @TAHIRKHAN-be6qf
    @TAHIRKHAN-be6qf Před 2 lety

    Amazing Bachir Khadir ! Visually you explained in much lesser time. keep developing Visual world. waiting to see you

  • @charlesmiller8391
    @charlesmiller8391 Před 2 lety

    Really helpful video and channel overall! Hope you keep It up

  • @ayushjaiswal5288
    @ayushjaiswal5288 Před 4 měsíci

    Great great video very much easier to understand

  • @tomasjavurek1030
    @tomasjavurek1030 Před 2 měsíci

    And thanks for the video btw. It is amazing.

  • @kejiahu3531
    @kejiahu3531 Před rokem

    Thank you! Very clear!

  • @shivamakarte4184
    @shivamakarte4184 Před 5 měsíci

    great visuals, thanks!

  • @chouaib0012able
    @chouaib0012able Před rokem +1

    Excellent brother 🇲🇦

  • @piyukr
    @piyukr Před rokem

    One word: grateful

  • @CStrik3r
    @CStrik3r Před 2 lety +1

    Big ups from 🇲🇦 Keep up the great work 👏🏼👏🏼👏🏼

  • @Higgsinophysics
    @Higgsinophysics Před 2 lety +3

    You are a very talented teacher !

  • @kaushalgagan6723
    @kaushalgagan6723 Před 2 lety

    this channel really good

  • @drOthman1984
    @drOthman1984 Před 11 měsíci

    Excellent work.

  • @calvinelder2242
    @calvinelder2242 Před 2 lety +1

    Excellent explanation with a beautiful aesthetic

  • @1matzeplayer1
    @1matzeplayer1 Před 23 dny

    Great video!

  • @luis96xd
    @luis96xd Před 2 lety +1

    Great video and nice explanations! has a lot of work on the animations and textures 😁👍

  • @roshinroy5129
    @roshinroy5129 Před 2 lety

    Amazing explanation man

  • @erikhallstrom5259
    @erikhallstrom5259 Před 2 lety +2

    Amazing! But such a cliff-hanger! I want to see the kernel trick as well :)

  • @alexfoo_dw
    @alexfoo_dw Před 2 lety +11

    Beautiful and well explained :) Hello from Singapore!
    I'm wondering: what animation software do you use to produce this?

    • @VisuallyExplained
      @VisuallyExplained  Před 2 lety +13

      Hello! :) I used the software Blender3D for creating the 3D animations, the library manim for 2D, and premiere/after effect for putting everything together.

    • @alexfoo_dw
      @alexfoo_dw Před 2 lety +3

      @@VisuallyExplained amazing! Thanks much :) keep doing what you do

  • @revanthyanduru6755
    @revanthyanduru6755 Před rokem +1

    excellent!!

  • @anna.a189
    @anna.a189 Před 2 lety

    Very well Explained!! Leaving a comment to increase the popularity of the video!

  • @santali-tr3rj
    @santali-tr3rj Před rokem

    U are great sir .I messed up with finding what is PCA .All ppl 's explaining way is complicated .urs way can help ppl understand python PCA.Thanks .

  • @arthmishra6474
    @arthmishra6474 Před rokem +1

    Loved the visual depiction to explain the concept.. I wish to know which software was used for the animations ??

  • @magalhaees
    @magalhaees Před 4 dny

    We center the data to have a mean of 0, which allows us to match the form of the covariance matrix provided in the video

  • @user-fq7tt6yc6t
    @user-fq7tt6yc6t Před rokem

    This is so good

  • @cobrasniper555
    @cobrasniper555 Před měsícem

    Great video! But, how is happiness related to any of these factors? Based on the covariance matrix, I could only see how each factor is related to one another. Was there another vector in there based on ranking that is not included?

  • @kavinyudhitia
    @kavinyudhitia Před rokem

    Nice!

  • @user-alexander353
    @user-alexander353 Před 6 měsíci

    Thanks!

  • @AHMADKELIX
    @AHMADKELIX Před 2 lety

    permission for learn sir .thank you

  • @NikosKoutsilieris
    @NikosKoutsilieris Před rokem

    thanks mate!

  • @fuzhouwang5593
    @fuzhouwang5593 Před 2 lety

    Thank you for this amazing video. This has helped me a lot, but I am a little bit confused about 2:18 when you say that it can be solved via Lagrange multiplier -- is this a convex optimization problem? The form looks good but this is a maximization problem. How can we apply the Lagrange multiplier method to solve a problem if it is non-convex?

    • @VisuallyExplained
      @VisuallyExplained  Před 2 lety +1

      Great point! The problem as written is not convex. But this is one of the (very) few nonconvex problems that can be solved to optimality with techniques usually reserved for convex problems.

  • @tomasjavurek1030
    @tomasjavurek1030 Před 2 měsíci

    It might be possible to explain the search for PCs even without explaining the Langrangian optimization: There is simply a linear transformation that one wants to perform on the features such that the covariance matrix is as diagonal as possible. The reason for that is that when non-diagonal terms are 0 or close to 0, it means, that the two corresponding new features are really independent. So the explanation can actually boil down to finding the best linear transformation. So this wage explanation shows why we should search for eigenvectors. It however doesn't explain why the best eigenvector is the one with the largest eigenvalue.

  • @seydapoyraz9684
    @seydapoyraz9684 Před měsícem

    thank you

  • @iskhezia
    @iskhezia Před 16 dny

    I love it! Thanks for that. Can you share the code used for PCA in this video, please? I am trying repeat, but my results dont check with yours, I want to see where I'm going wrong (I didn't find it in the description on github).
    Thanks for the video.

  • @pomegranate8593
    @pomegranate8593 Před rokem

    SUPERAWESOME!!!

  • @techbeauti-techeducationli3266

    Great video, For clarity, I've noticed that the features are color coordinated however, Social is green and Life is Blue which makes your equation for u1 and u2 the life and social labels should be swapped. u2 = (0.22 GDP + 0.55 Social) - 0.8 Life . Check the vectors as well. Could you please clarify.
    Just an observation for clarity. Thank you. :)

  • @judgelaloicmoi
    @judgelaloicmoi Před 2 lety +3

    very good explanation. just how could you infer the meaning of the first two components that you called ‘power’ & ´balance’ ?

    • @VisuallyExplained
      @VisuallyExplained  Před 2 lety +2

      This is actually a very good question! One of the downsides of PCA is that it gives components that not interpretable by defaults. The only way to give them meaning is to look at the coefficients of the vector components and try to make sense of them (which is what I did for the video).

  • @MsKouider
    @MsKouider Před rokem

    simple but not simplist.. this is the eigenTRUTH. THANKS FROM ALGERIA...

  • @nitika9769
    @nitika9769 Před 4 měsíci

    1:55 information preserved i.e. dot product would be just x transpose u, wouldn't it? why did we square it? is it because how we always take root mean square ??

  • @vinayakmarv6873
    @vinayakmarv6873 Před 2 lety

    Nice

  • @cP-rh9cf
    @cP-rh9cf Před rokem

    how u hv taken gradient

  • @0202fabrice
    @0202fabrice Před rokem

    Thank you! It brings back (mostly unpleasant) memories of college matrix algebra from 4 decades past... but I get the gist.
    The only thing I could wish for would be a way to stop the video, and have a tool to re-orient the static 3D representation onto the 2D screen. That would greatly help me visualize what's being said (so well!)

  • @Arthur-uw1vm
    @Arthur-uw1vm Před 17 dny

    at 4:57, "the happiest country seems to be the most balanced ones", seems wrong, it should be "the most power ones" ?

  • @epsilondelta_873
    @epsilondelta_873 Před 10 měsíci

    Just asking... am i right to say C is semipositive definite?

  • @flaguser4196
    @flaguser4196 Před 2 lety

    how i imagine a typical united nations summit discussion to be

  • @popping1483
    @popping1483 Před 2 měsíci +1

    I know that Moroccan accent

  • @guilhermehx7159
    @guilhermehx7159 Před rokem

    0:00

  • @huh_wtf
    @huh_wtf Před 2 lety

    Very respectfully, please use correct maps of countries. For example India.

  • @user-se2jt9ow5k
    @user-se2jt9ow5k Před 7 měsíci

    Well explained video, but just a quick pointer. "Icelandic countries" is not a thing. Iceland is a country by itself. I am sure you must have meant Scandinavian countries. :) Otherwise, well made.

  • @igorg4129
    @igorg4129 Před 10 měsíci +1

    I am sorry for criticism, please read it only if you want to improve, otherwise leave it.
    Your graphics are great, and you know it, but some steps are not explained at all. For example at 4:45 suddenly show 3 axes that stop being perpendicular it is not only not clear why, but this unexplained "why" keeps the student`s brain busy instead of keeping following you. I am well familiar with the PCA and I maybe understood what you were trying to say, but others probably or didn't get you or (the most common) think they did. but they did not.

    • @VisuallyExplained
      @VisuallyExplained  Před 9 měsíci

      Thank you for taking the time to watch the video so carefully. I very much welcome your criticism to help improve the channel :-)

  • @haraldurkarlsson1147
    @haraldurkarlsson1147 Před rokem

    Hmm - I don't Norway would appreciate being called an "Icelandic" country. Iceland might not.

  • @user-dp9gi1vg8r
    @user-dp9gi1vg8r Před 11 měsíci

    why do russia looks like white blac and blue wtf? it white blue and red....