sim_factors {vrnmf} | R Documentation |
Simulate matrices to explores vrnmf
Description
sim_factors
simulates non-negative factorization matrices C
and D
under a variaty of conditions to explore factorization X = C*D + noise
.
Usage
sim_factors(
m,
n,
r,
simplex = "col",
distr = "unif",
frac.zeros = 0.4,
condition = FALSE,
noise = 0
)
Arguments
m |
Integers. Size of matrices. Matrix |
n |
Integers. Size of matrices. Matrix |
r |
Integers. Size of matrices. Matrix |
simplex |
A character. Either columns ("col") or rows ("row") of matrix |
distr |
A character. Distribution to simulate matrix entries: "unif" for uniform and "exp" for exponential distributions. (default="unif") |
frac.zeros |
A numeric. Fraction of zeros in matrix |
condition |
A boolean. Generate more well-conditioned matrix |
noise |
A numeric. Standard deviation of gaussian noise to add. (default=0e-4) |
Value
List of simulated matrices:
X.noise
, X
- noisy and original matrix X
to decompose.
C
, D
- factorization matrices.