Apply FactoMineR models to new data? (like S3 "predict" methods for prcomp and princomp)

585 views
Skip to first unread message

David P.

unread,
Jun 30, 2014, 5:05:04 PM6/30/14
to factomin...@googlegroups.com
After reading through "Exploratory Multivariate Analysis by Example Using R" and scouring the web for examples, I don't see any instances of applying any of the "models" built by the FactoMineR functions to unseen, new data (similar to prcomp and princomp in "stats" package using the "predict" S3 method). I know the FactoMineR package is geared more towards exploration rather than prediction, but it seems to me it would be nice to have "predict" methods as well.

Does anyone have any scripts for applying already-built/calculated MCA, MFA, or FAMD models to new data sets? I realize I should be able to deconstruct how the components are being calculated for each individual and do this myself, but was wondering if anyone out there has already done this.

Thanks in advance!

François Husson

unread,
Jul 10, 2014, 11:21:00 PM7/10/14
to factomin...@googlegroups.com
You can just consider a data set with both the individuals that are used to "fit the model", and the new individuals.
Then, you perform a PCA using the argument ind.sup=     and you put the indices of the new individuals.

It is the same with the other methods MCA, MFA, FAMD,

FH

avinash Das

unread,
Feb 16, 2015, 2:42:13 AM2/16/15
to factomin...@googlegroups.com
Hi Francois,

The ind.sup will works for new data. But this implies that every time for a new data, PCA needs to be recalculated. A better approach would be to use predict function. However, this might be not very straight forward because PCA either use svd or eigen (if svd fails).

thanks
avi

S Sam

unread,
Jun 21, 2018, 3:29:00 PM6/21/18
to FactoMineR users
Hi 

Related to topic of this conversation in using predict for new data using PCA, What is the difference between calling PCA.predict function for new data versus having new data part of building existing PCA model using ind.supp ? it seems Francois was offering using ind.supp for prediction of new data but if we do it, then aren't we building the model again? 

Wasn't PCA.predict wasn't available in 2015 when the suggestion of ind.supp suggested? 

I appreciate groups' help for this if possible. 

Regards,

François Husson

unread,
Jun 26, 2018, 11:19:16 AM6/26/18
to factomin...@googlegroups.com
PCA.predict and ind.sup can be used and gives the same results.
The advantage of PCA.predict is that the dimensions are calculated once and then the coordinates of the supplementary individuals can be calculated sequentially.
FH
--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "FactoMineR users".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse factominer-use...@googlegroups.com.
Pour obtenir davantage d'options, consultez la page https://groups.google.com/d/optout.

--
Francois Husson
Department Statistics & Computer science
AGROCAMPUS OUEST
65 rue de St-Brieuc - 35042 RENNES
Tel: +33 2 23 48 58 86
http://www.agrocampus-ouest.fr/math/husson
Reply all
Reply to author
Forward
0 new messages