mfa: multiple factor analysis

Description Usage Arguments Examples

View source: R/mfa.R

Description

mfa

Usage

1
2
3
4
5
6
7
8
9
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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 Dec. 9, 2020, 7:02 p.m.