View source: R/simulate_factorization.R
sim_factors | R Documentation |
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 )
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) |
List of simulated matrices:
X.noise
, X
- noisy and original matrix X
to decompose.
C
, D
- factorization matrices.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.