Principal Component Analysis (PCA) using Python (Scikit-learn)




[ad_1]

Principal Component Analysis (PCA) using Python (Scikit-learn)

Step by Step Tutorial: https://towardsdatascience.com/pca-using-python-scikit-learn-e653f8989e60

Source


[ad_2]

Comment List

  • Michael Galarnyk
    December 2, 2020

    I recently created a course called Python for Data Visualization: https://www.linkedin.com/learning/python-for-data-visualization/effectively-present-data-with-python
    for LinkedIn Learning.

  • Michael Galarnyk
    December 2, 2020

    Thank You

  • Michael Galarnyk
    December 2, 2020

    666 likes

  • Michael Galarnyk
    December 2, 2020

    Thank you a lot! I have a problem: No module named sklearn.decomposition ( i am using python 2.7.10) . I think I have to download a pip or something but dont have the right command

  • Michael Galarnyk
    December 2, 2020

    Great video and blot post. Thanks very much for sharing your knowledge, in a really clear manner! One suggestion, and it's probably a topic for another blog post. My understanding is that much of the value add of the human (so far) is in the area of feature engineering. In the case of the iris data, just dividing one feature by another and saving that ratio provides an additional valuable dimension with predictive value. So 2 questions: 1) when you reduced the # of dimensions, did PCA automatically do that for you? 2) do you have other videos or tools which could help automatically create additional features for PCA to "whittle down"? Thanks in advance.

  • Michael Galarnyk
    December 2, 2020

    Hi,
    Great content, and I really appreciate the hands-on approach in explaining how this is done in Python. However, I have the following questions (newby ones most likely):
    1- Are the openml datasets of a special kind? (I see that we can pass the 'data' and 'target' methods on the actual data which I haven't seen for other datasets.
    2- For the StandardScaler() and PCA functions, why do we only fit for the train data? why not fit/transform for the train and test sets independently?

    Thanks!

  • Michael Galarnyk
    December 2, 2020

    Gonna try that out right away. thank you! πŸ˜€

  • Michael Galarnyk
    December 2, 2020

    got it, okay?

  • Michael Galarnyk
    December 2, 2020

    Thanks Mike for the clear tutorial and for sharing the Jupiter notebooks… A confusing aspect for me usually working with images, is how you go from a raw image to array similar to the data you loaded at the begining of your tutorial….

  • Michael Galarnyk
    December 2, 2020

    The okay, okay, okay, okay is pretty distracting. very hard to watch.

  • Michael Galarnyk
    December 2, 2020

    great tutorial, and the article is even greater (if that's possible ;- ) thanks a lot for that great content, I'm going to dig all of your videos now, should be fascinating, thanks again, keep up the great work ! all the best from Europe πŸ˜‰

  • Michael Galarnyk
    December 2, 2020

    Great video!

  • Michael Galarnyk
    December 2, 2020

    Let play a drinking game. every time Michael says OKAY we have to drink….ok? ops

  • Michael Galarnyk
    December 2, 2020

    Thanks, the step by step tutorial is great! thanks man!

  • Michael Galarnyk
    December 2, 2020

    13:30 is this correct?? I could not see any parameter related to "variance to be retained".
    I have 247 parameters in my data setand
    I am getting 1 when using "PCA(. 95)" and then "pca.n_components_".

    Please help me with this..!!!

  • Michael Galarnyk
    December 2, 2020

    If you stop saying "Okay" all the time, perhaps your videos will be better.

  • Michael Galarnyk
    December 2, 2020

    This Video is really informative, Thank you Michael.
    You did mention about Pipeline, Can you create a video explaining end to end pipeline creation in a real world scenario.

  • Michael Galarnyk
    December 2, 2020

    OK?

  • Michael Galarnyk
    December 2, 2020

    excuse me! some one can you help me for solving my problem?
    "FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison

    result = method(y)"
    this error appears when i want to visualize 2D Projection. Thanks before!

  • Michael Galarnyk
    December 2, 2020

    please don't say OK after every sentence.

  • Michael Galarnyk
    December 2, 2020

    Thank you for the great tutorial

  • Michael Galarnyk
    December 2, 2020

    Hi ,

    Thank you for the nice video. I am quite new to this filed of using python for PCA, I was following your tutorial but I was not able to generate the final graph that you show for the three different flowers. It give me the following error. If it is within the scope of this tutorial could you please shed some light.

    "No XVisualInfo for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 0, greenBufferSize 0, blueBufferSize 0, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(SingleBuffer), swapInterval 1, profile QSurfaceFormat::OpenGLContextProfile(NoProfile))

    Falling back to using screens root_visual.

    Unsupported screen format: depth: 8, red_mask: 0, blue_mask: 0"

  • Michael Galarnyk
    December 2, 2020

    Nice explanation and tutorial. If I have to say 1 point of criticism: Don't say 'OK?' after every sentence πŸ™‚

  • Michael Galarnyk
    December 2, 2020

    hi Michael great video, wasnt able to download the data for mnist though please guide. It was giving time out error

  • Michael Galarnyk
    December 2, 2020

    Hi Dear

    can you find the area or diameter of an apple by its image?

  • Michael Galarnyk
    December 2, 2020

    sir in your code there is an error while standardizing the feature in jupyter notebook 5.7.4 please help sir.

  • Michael Galarnyk
    December 2, 2020

    That was fantastic. Thanks…

  • Michael Galarnyk
    December 2, 2020

    Excellent video and clear explanation. New subscriber!

  • Michael Galarnyk
    December 2, 2020

    Ok, this is epic.

  • Michael Galarnyk
    December 2, 2020

    Amazing tutorial man! Thanks a lot for this fantastic tutorial!

  • Michael Galarnyk
    December 2, 2020

    Best PCA using Python. Awesome!

  • Michael Galarnyk
    December 2, 2020

    Very nice Explanation Sir. Can you please send me the program at arhaamansari9867@gmail.com. It would be of great help for me.

  • Michael Galarnyk
    December 2, 2020

    really like the way you organized your blog

  • Michael Galarnyk
    December 2, 2020

    okay πŸ˜› πŸ˜›

  • Michael Galarnyk
    December 2, 2020

    i see a lot of people complaining about the author saying "OK" too often. It's an amazing FREE tutorial, give him some slack or GTFO ! (or create an ML model that removes the "ok", but i bet you can't , cheers!)

  • Michael Galarnyk
    December 2, 2020

    Excellent Work. Very informative.

  • Michael Galarnyk
    December 2, 2020

    if I use KernelPCA, should it be more precise?

  • Michael Galarnyk
    December 2, 2020

    Great computing work but stop saying "OK" !!!!!! A bit disappointed that there is no deeper mathematical analysis on the results you get and what is contained in the 2 principal components… This should be the most important part….

  • Michael Galarnyk
    December 2, 2020

    I get an "HTTP Error 403: Forbidden" when i try to load iris dataset

  • Michael Galarnyk
    December 2, 2020

    Can you provide the links for other sites you used in this tutorial? I want to work on using the codes and data you presented before using PCA on my dataset for my Honors Thesis. Thanks!

  • Michael Galarnyk
    December 2, 2020

    Great explanation video. Thank you!

  • Michael Galarnyk
    December 2, 2020

    holy frickin moly thank you

Write a comment