MaxHalford / prince

:crown: Multivariate exploratory data analysis in Python — PCA, CA, MCA, MFA, FAMD, GPA
https://maxhalford.github.io/prince
MIT License
1.27k stars 184 forks source link

Difficulty applying FMA with a group of categorical variables. #146

Closed alejandroabrilacosta closed 1 year ago

alejandroabrilacosta commented 1 year ago

When applying the FMA method to a group of categorical and numerical variables, I'm having difficulty finding a guide on how to do it specifically for a group of categorical variables.

If I only create the group and run the model, I get the following error.

/usr/local/lib/python3.9/dist-packages/prince/mfa.py:59: FutureWarning: The default value of numeric_only in DataFrame.mean is deprecated. In a future version, it will default to False. In addition, specifying 'numeric_only=None' is deprecated. Select only valid columns or specify the value of numeric_only to silence this warning. X = (X - X.mean()) / ((X - X.mean()) 2).sum() 0.5 /usr/local/lib/python3.9/dist-packages/prince/mfa.py:59: FutureWarning: The default value of numeric_only in DataFrame.mean is deprecated. In a future version, it will default to False. In addition, specifying 'numeric_only=None' is deprecated. Select only valid columns or specify the value of numeric_only to silence this warning. X = (X - X.mean()) / ((X - X.mean()) 2).sum() 0.5

MaxHalford commented 1 year ago

Do you mean MFA? If so, MFA only works with numeric data. FAMD however supports categorical data.