mfa: multiple factor analysis

View source: R/mfa.R

mfaR Documentation

multiple factor analysis

Description

mfa

Usage

mfa(
  X,
  ncomp = 2,
  preproc = center(),
  normalization = c("MFA", "RV", "None", "RV-MFA", "Dual-RV", "Frob", "custom"),
  M = NULL,
  A = NULL,
  ...
)

Arguments

X

a block_matrix object

ncomp

the number of components to estimate

preproc

a preprocessing pipeline, default is 'center()'

normalization

the normalization method: MFA, RV, RV-MFA, or None (see details).

M

custom weight matrix for the rows

A

custom weight matrix for the columns

Examples


X <- block_matrix(replicate(5, { matrix(rnorm(10*10), 10, 10) }, simplify=FALSE))
res <- mfa(X, ncomp=3, normalization="MFA")
p <- partial_scores(res, 1)
stopifnot(ncol(scores(res)) == 3)

labs <- letters[1:10]
cfier <- classifier(res, labels=labs, ncomp=3)
pred <- predict(cfier, X[1:2,])
cfier2 <- classifier(res, labels=labs, ncomp=3, colind=res$block_indices[[2]])
pred2 <- predict(cfier2, X[1:2,res$block_indices[[2]]])

bbuchsbaum/neuropls documentation built on April 17, 2022, 8:46 a.m.