Skip to contents

A low rank matrix factorization of a matrix X is parameterized by X ~= X %*% B %*% t(Y). The object is "factor analysis-like" because the middle matrix in the decomposition is arbitrary rather than diagonal.

Usage

fa_like(Z, B, Y, subclasses = NULL, ...)

Arguments

Z

A matrix of embeddings for each observation.

B

A mixing matrix describing how observation embeddings and topics interact. Does not have to be diagonal!

Y

A matrix describing the compositions of various topics or factors.

subclasses

A character vector of subclasses. Optional, defaults to NULL.

...

Optional additional items to pass to the constructor.

Examples


s <- svd(as.matrix(trees))

fa_like(s$u, diag(s$d), s$v)
#> Factor Analysis-Like Matrix Factorization
#> ---------------------------------------
#> 
#> Rank: 3
#> Rows: 31
#> Cols: 3
#> Components
#> 
#> Z: 31 x 3 [matrix] 
#> B: 3 x 3 [matrix] 
#> Y: 3 x 3 [matrix]