MaxHalford / prince

:crown: Multivariate exploratory data analysis in Python — PCA, CA, MCA, MFA, FAMD, GPA

Home Page:https://maxhalford.github.io/prince

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Difficulty applying FMA with a group of categorical variables.

alejandroabrilacosta opened this issue · comments

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

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