How to Apply PCA before K-means Clustering in R Programming (Example) | Principal Component Analysis

Поделиться
HTML-код
  • Опубликовано: 4 янв 2025

Комментарии • 29

  • @USKalemao
    @USKalemao 9 дней назад

    It's 3 a.m. and your channel saved my night! Now I can go to bed. Thanks!

  • @gt6139a
    @gt6139a 9 месяцев назад +1

    Great video. Thank you for making it:) It would've been interesting to plot the same, but coloring the dots using the original labels as well. Then we can see how well the groupings done using unsupervised learning compared to the original labels!!

    • @StatisticsGlobe
      @StatisticsGlobe  9 месяцев назад +1

      Thanks for the kind words and the nice idea! It would definitely be nice to visualize this comparison. Next time! :)

  • @smartinssmart
    @smartinssmart 9 месяцев назад +1

    nicely done! 👌

    • @StatisticsGlobe
      @StatisticsGlobe  9 месяцев назад

      Thank you so much, glad you like it! :)

  • @rodrigopalmacl
    @rodrigopalmacl 9 месяцев назад +1

    muy interesante estimado practicare con su ejercicio y agradezco su video.

    • @StatisticsGlobe
      @StatisticsGlobe  9 месяцев назад

      That's great to hear, Rodrigo! Glad the videos are helpful!

  • @gopaltiwariful
    @gopaltiwariful 2 месяца назад +2

    Error: unexpected invalid token in "my_pca

    • @StatisticsGlobe
      @StatisticsGlobe  2 месяца назад

      Please see my response to your other question.

  • @CryptoStop360
    @CryptoStop360 7 месяцев назад +1

    hello can u make video how to apply multi condtion to all items for data frame and combine with and + or
    i not find it on line
    thanks

    • @CryptoStop360
      @CryptoStop360 7 месяцев назад +1

      i mean apply condtion with and + or to alll items inside data frame

    • @StatisticsGlobe
      @StatisticsGlobe  7 месяцев назад

      Thanks for the topic suggestion, I'll keep it in mind.

  • @korman9872
    @korman9872 3 месяца назад

    Thank you sir, i helps

  • @gopaltiwariful
    @gopaltiwariful 2 месяца назад +1

    when in performed this code with my data R showing "Error: unexpected invalid token in "my_pca" this any suggestion?

    • @StatisticsGlobe
      @StatisticsGlobe  2 месяца назад

      Hey, did you run the code exactly as demonstrated in the video?

    • @gopaltiwariful
      @gopaltiwariful 2 месяца назад +1

      @@StatisticsGlobe Yes as it is

    • @StatisticsGlobe
      @StatisticsGlobe  2 месяца назад

      That's weird, to be honest, I don't know why this is happening. On my side, everything works fine.

  • @ibrahimlawan9663
    @ibrahimlawan9663 9 месяцев назад +1

    Great video. Thank you.
    Is there any assumption before deciding to use PCA or PCoA?

    • @StatisticsGlobe
      @StatisticsGlobe  9 месяцев назад

      Thanks for the kind comment, Ibrahim! Glad you liked the video. Before using PCA (Principal Component Analysis), it's assumed that linear relationships exist in the data and that the most important variance directions are the ones to focus on. For PCoA (Principal Coordinates Analysis), the assumption is that distances or dissimilarities between data points can meaningfully reflect their relationships. So it depends on your specific data whether to use PCA or PCoA. I hope this helps!

  • @uselessminority6071
    @uselessminority6071 9 месяцев назад +1

    what if PC1 and PC2 only explain lets say 75% of variance? how would you proceed? is that enought or is it possible to somehow add PC3 and PC4 in the analysis?
    Great video btw 👍👍

    • @jeanpascalkoh4123
      @jeanpascalkoh4123 9 месяцев назад +1

      I think it still ok. However more PC becomes difficult for human perception of 3 or more dimensions.
      Cheers!

    • @jeanpascalkoh4123
      @jeanpascalkoh4123 9 месяцев назад +1

      Nice presentation

    • @StatisticsGlobe
      @StatisticsGlobe  9 месяцев назад +1

      Hey, thanks for the great feedback, glad you like the video! Regarding your question: Yes, you can definitely add more components (and usually this is what you would do with a realistic data set). You would just have to change the number in this line of code from 2 to whatever number of components you would like to keep: my_pca_data <- data.frame(my_pca$x[ , 1:2]) Please note that it might become more difficult to visualize your data when using more components. I hope that clarifies your question! Regards, Joachim

  • @uma9183
    @uma9183 8 месяцев назад +1

    thank you sir, but provide your script of code in notepad format ;; my suggestion only

    • @StatisticsGlobe
      @StatisticsGlobe  8 месяцев назад

      Hey, thanks for your kind comment. I assume you could simply copy and paste the code from the description into notepad, couldn't you?

    • @uma9183
      @uma9183 8 месяцев назад +1

      @@StatisticsGlobe I am telling in your channel space point of view, and other also convient ;; thank you for your response

    • @uma9183
      @uma9183 8 месяцев назад +1

      please make video satellite data handle in R

    • @StatisticsGlobe
      @StatisticsGlobe  8 месяцев назад

      Thanks for the topic suggestion! I'm not an expert on this, but it might be a nice topic for the future.