# How to combine PCA and MCA on mixed data?

Suppose I have mixed data and (python) code which is capable of doing PCA (principal component analysis) on continuous predictors and MCA (multiple correspondence analysis) on nominal predictors. Is it possible to combine results from PCA and MCA into one?

You may want to use Factor analysis of mixed data.

It allows you to do dimension reduction on a complete data set.

A R implementation could be found in the FactoMineR package. But this function struggle when you have a high number of data/columns.

I am not aware of the existence of the equivalent in python.

• Thank you, I have read about FAMD before, which unfortunately seems to have only R support - hence my question. The least I can do now is to treat results of both methods (PCA & MCA) in separation. However, if there is a way to 'mix' them together to yield a monolithic dataset then this is the answer I am looking for. – Wojciech Migda Jan 19 '16 at 15:22
• Ok, it turned out that my dataset is big enough as to make the MCA implementation at hand to run out of memory. – Wojciech Migda Jan 19 '16 at 17:00
• This is a recurrent issue I get with the R implementation. If you have a limited set of variable, try to weight your observations. Or use only a subset of your observation. Otherwise, you could try to transform your numeric variable into ordinal category or to transform your qualitative variables into flags. – YCR Jan 19 '16 at 17:03

I was looking for the same thing in Python and I came the prince package that has FAMD implemented.

I don't have enough points to comment so answering here @Edo prince Package has only CA, MCA and PCA PAckages in it. I do not see any FAMD in here.

dir(prince)

['CA', 'MCA', 'PCA', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', '__version__', 'ca', 'mca', 'pca', 'plot', 'svd']


You can find FAMD implementation for Python here.