9
$\begingroup$

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?

$\endgroup$

4 Answers 4

8
$\begingroup$

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.

$\endgroup$
3
  • $\begingroup$ 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. $\endgroup$ Jan 19, 2016 at 15:22
  • $\begingroup$ Ok, it turned out that my dataset is big enough as to make the MCA implementation at hand to run out of memory. $\endgroup$ Jan 19, 2016 at 17:00
  • $\begingroup$ 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. $\endgroup$
    – YCR
    Jan 19, 2016 at 17:03
3
$\begingroup$

You can find FAMD implementation for Python here.

$\endgroup$
1
$\begingroup$

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

$\endgroup$
1
$\begingroup$

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']
$\endgroup$
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.