Generate a random matrix that follows some defined NMF model to test NMF factorizations. Adapts methods from NMF::syntheticNMF
.
Usage
simulateNMF(nrow, ncol, k, noise = 0.5, dropout = 0.5, seed = NULL)
Arguments
- nrow
number of rows
- ncol
number of columns
- k
true rank of simulated model
- noise
standard deviation of Gaussian noise centered at 0 to add to input matrix. Any negative values after noise addition are set to 0.
- dropout
density of dropout events
- seed
seed for random number generation
Value
list of dense matrix A
and true w
and h
models