How to Perform Factor Analysis in Python(Step by Step)

Sdílet
Vložit
  • čas přidán 23. 07. 2024
  • This video explains How to Perform Factor Analysis in Python(Step by Step) with Jupyter Notebook
    Get Dataset here: vincentarelbundock.github.io/...
    To Learn Python: www.kindsonthegenius.com/python
    Machine Learning 101: www.kindsonthegenius.com/2019...
    Subscribe Kindson The Tech Pro CZcams: bit.ly/2PpJd8Q
    Join my group ICS on Facebook: bit.ly/2UULiQj
    Follow me on Instagram - / kindsonm
    Connect with me on LinkedIn: / kindson
    Follow me on Twitter: / kindsonm
    Learn about me: www.kindsonthegenius.com
    Learn How to perform Factor analysis, a very important concept in Machine Learning and Data Science
  • Věda a technologie

Komentáře • 53

  • @inusun
    @inusun Před 4 lety +4

    Great video, helped out a lot it processing my data using factor analysis for my data science class.

  • @loogsnyakwardyoh4854
    @loogsnyakwardyoh4854 Před 3 lety +4

    the correct column name is "Unnamed: 0". df.drop(['Unnamed: 0'], axis = 1, inplace = True) works...

  • @williamkanaan7554
    @williamkanaan7554 Před 4 lety

    When I type fa.fit(df), it tells me there is an error "ValueError: Found array with 0 sample(s) (shape=(0, 38)) while a minimum of 1 is required by FactorAnalyzer." but when I check my document there is not ligne with 0 values, what can I do please?

  • @stepheneaster3166
    @stepheneaster3166 Před 4 lety

    Hi, just finding this great video on FA, thanks for posting it. When I use the varimax orthogonal rotation and then use transform() to 'score' the dataframe with the factor model, the resulting factors do not have 0 correlation as expected from an orthogonal transformation. I'd like to take those factors as inputs into a clustering exercise but want non correlated factors (similar to PCA). Thanks in advance for any thoughts on where I might be going awry.

  • @elhamahmadi8673
    @elhamahmadi8673 Před rokem

    Hi, I have one question. if we want to use FA or PCA for feature selection of all types of data(without dropping string type of data) how can we do that? Is there any alternative to apply?

  • @brettgregory3622
    @brettgregory3622 Před 3 lety

    Any ideas on how one could go about getting goodness of fit indices? All my FAs are done in R purely because of these fit indices but I really want to completely move over to Python.

  • @javiercmh
    @javiercmh Před 4 lety +1

    very useful as it is!!! thanks a ton!

  • @spef7396
    @spef7396 Před 2 lety

    Thank you very much, final year computer science but very little experience in statistics etc. this was a massive help

  • @rajeshghosh4344
    @rajeshghosh4344 Před 3 lety

    Even after appending the site package directory the factor_analyzer is not importing. Can you help?

  • @user-gx9hk8gt3k
    @user-gx9hk8gt3k Před 2 lety +1

    df = drop(['unnamed:0'], axis=1, inplace = True) This one works.

  • @uniongrob8194
    @uniongrob8194 Před 3 lety +1

    Helpfull video, thanks!

  • @veronicam2102
    @veronicam2102 Před 3 lety

    Thanks!! this video was very helpful to me :D

  • @phanthilanhuong1783
    @phanthilanhuong1783 Před 3 lety

    Thank you for your sharing and fantastic guiding

  • @austin_adetunji
    @austin_adetunji Před rokem

    Wow, this is great. i wish i can like this video multiple times

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

    Could you explain for me why I have different results while implementing Factor Analysis in Python and STATA? There are differences in both scree plot and the value of loading factors :(( Don't know which is the correct one now :( Thank you for your support!

  • @aysenzumrutsonmez3699
    @aysenzumrutsonmez3699 Před 2 lety

    I had an ModuleNotFoundError for factor_analyzer in the first step. How i solve this error? Please help me

  • @sharp389
    @sharp389 Před 4 lety +1

    do you know of algorithms to use other criteria to select factors? like cng package in R? Horn's PA, etc.?

  • @henny628
    @henny628 Před 4 lety

    Hi, I am trying to analyse data with multiple factors over a series of time. Is there a way I can consult you off youtube?

  • @matangaelisha2116
    @matangaelisha2116 Před 3 lety

    i cant see the link to the dataset please

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

    This video litterally saved me and my Master's Dissertation. Great explanations, easy to understand and follow. thank you very much!!

    • @samuelceciliochucuyamamani561
      @samuelceciliochucuyamamani561 Před 3 lety

      Hello! previously I was using Minitab and obtaining the factor scoring coefficients and then graphing.
      I don't know how to get that with python, I hope you can help me please.
      Saludos

  • @kennedybwire9435
    @kennedybwire9435 Před 2 lety

    Hi, that is great work.

  • @josephkarianjahi1467
    @josephkarianjahi1467 Před 4 lety +1

    Good work!

  • @c.e.g.o4797
    @c.e.g.o4797 Před 4 lety

    Thank you, bro.

  • @quiosaevaristo7746
    @quiosaevaristo7746 Před rokem

    Hi, that is an amazing video.

  • @inspiritlashi9994
    @inspiritlashi9994 Před 3 lety

    This is such a great video.. Thank you so much

  • @Sudo007
    @Sudo007 Před 4 lety +1

    Please, tell me what the values in the matrix signify.

    • @TieMaxx
      @TieMaxx Před 4 lety

      Answers to a questionnaire about personality (Big-Five traits). A1 through 5 represent questions about agreeableness, N is neuroticism, C is conscientiousness, E is extraversion and O is openness to experience. 1 represents an answer of -2 and 5 is actually +2. It does not really matter though, because they are all getting standardized by the standard variation and the mean. For example one question might be "I am interested in talking about abstract topics". -2 (in the matrix: 1.0) would mean that the statement does not describe you at all, while +2 (in the matrix: 5.0) means, it describes you perfectly. etc. etc.

  • @lucasmigge3159
    @lucasmigge3159 Před 4 lety

    thank you very much

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

    This is by far the best video on the internet to explain factor analysis and all the steps necessary! Great work!

  • @chavianddavid
    @chavianddavid Před 3 lety

    Is there something called "Factor Scores" as well?

  • @Lernal
    @Lernal Před 3 lety

    good factor analysis for python

  • @nnn-bb5tf
    @nnn-bb5tf Před 2 lety +1

    Thanks for this excellent video

  • @vineetsodhani5398
    @vineetsodhani5398 Před 4 lety

    How does one load the factor analyzer package? Where does one find the package?

    • @Sudo007
      @Sudo007 Před 4 lety +1

      pip install factor_analyzer

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

    Could you explain me on what basis the factors were selected in FactorAnalyzer

    • @KindsonTheTechPro
      @KindsonTheTechPro  Před 2 lety

      Nice question but the explanation is not trivial. We consider the factor loading of each variable which tells us the entent to which the variable relates with the factor. We then select factors with highest loadings. I'll recomment you read up Principal Components Analysis(PCA) as it helps you understand FA.
      www.kindsonthegenius.com/pca-tutorial-1-how-to-perform-principal-components-analysis-pca/
      www.kindsonthegenius.com/principal-components-analysispca-in-python-step-by-step/
      www.kindsonthegenius.com/basics-of-factor-analysis-for-data-scientists/
      Question, What is Factor Analysis czcams.com/video/s2ffkELXsHc/video.html

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

    where can I find your Jupyter notebook?

    • @KindsonTheTechPro
      @KindsonTheTechPro  Před 2 lety

      Would you like to join and 6 Weeks Intensive Data Science Course that begins this week? Let me know on mail@kindsonthegenius.com.

  • @luisady8990
    @luisady8990 Před 4 lety +1

    If you have trouble w/factor analyzer:
    1. Open cmd and paste: pip install factor_analyzer
    2. Once it is successfully installed, paste the command again and get the file path it is downloaded in (first line after the command).
    3. Follow the rest of the steps in the video.

  • @sindimazibuko1399
    @sindimazibuko1399 Před 3 lety

    Can someone please help me figure out the name of the test I need to perform to see if my data is suitable for factor analysis? I can not seem to hear the name. Thank you in advance.

    • @qudsiyajan6485
      @qudsiyajan6485 Před 3 lety +1

      KMO and Bartlett's test of sphericity can help you in knowing if data is suitable for factor analysis or not.....

  • @charleshowe1297
    @charleshowe1297 Před 4 lety

    In 15:51-16:07 you said ev=eigenvectors and v=eigenvalues.
    But during the scree plot, you said ev = eigenvalues.
    Which is correct?

  • @al702893
    @al702893 Před 3 lety +1

    You just copied datacamp's tutorial, including comments