vrnmf
sim_factors
simulates non-negative factorization matrices C
and D
under a variaty of conditions to explore factorization \(X = C*D + noise\).
sim_factors(
m,
n,
r,
simplex = "col",
distr = "unif",
frac.zeros = 0.4,
condition = FALSE,
noise = 0
)
Integers. Size of matrices. Matrix C
has a size of m*r
and matrix D
has a size of r*n
.
Integers. Size of matrices. Matrix C
has a size of m*r
and matrix D
has a size of r*n
.
Integers. Size of matrices. Matrix C
has a size of m*r
and matrix D
has a size of r*n
.
A character. Either columns ("col") or rows ("row") of matrix C
are projected onto unit simplex. (default="col")
A character. Distribution to simulate matrix entries: "unif" for uniform and "exp" for exponential distributions. (default="unif")
A numeric. Fraction of zeros in matrix C
. It promotes sufficient scattering of matrix column/row vectors. (default=0.4)
A boolean. Generate more well-conditioned matrix R
. (default=FALSE)
A numeric. Standard deviation of gaussian noise to add. (default=0e-4)
List of simulated matrices:
X.noise
, X
- noisy and original matrix X
to decompose.
C
, D
- factorization matrices.