Description Usage Arguments Details Value Examples
Perform variational Bayes NMF and store factor matrices in object
1 2 3 4 5 6 | vb_factorize(object, ranks = 2, nrun = 1, verbose = 2,
progress.bar = TRUE, initializer = "random", Itmax = 10000,
hyper.update = rep(TRUE, 4), gamma.a = 1, gamma.b = 1,
Tol = 1e-05, hyper.update.n0 = 10, hyper.update.dn = 1,
connectivity = TRUE, fudge = NULL, ncores = 1, useC = TRUE,
unif.stop = TRUE)
|
object |
|
ranks |
Rank for factorization; can be a vector of multiple values. |
nrun |
No. of runs with different initial guesses. |
verbose |
The verbosity level: 3, each iteration output printed; 2, each run output printed; 1, each randomized sample output printed; 0, silent. |
progress.bar |
Display progress bar with |
initializer |
If |
Itmax |
Maximum no. of iteration. |
hyper.update |
Vector of four logicals, each indcating whether
hyperparameters |
gamma.a |
Gamma distribution shape parameter. |
gamma.b |
Gamma distribution mean. These two parameters are used for
fixed hyperparameters with |
Tol |
Tolerance for terminating iteration. |
hyper.update.n0 |
Initial number of steps in which hyperparameters are fixed. |
hyper.update.dn |
Step intervals for hyperparameter updates. |
connectivity |
If |
fudge |
Small positive number used as lower bound for factor matrix
elements to avoid singularity. If |
ncores |
Number of processors (cores) to run. If |
useC |
Use C++ version of updates for speed. |
unif.stop |
Terminate if any of columns in basis matrix is uniform. |
The main input is the scNMFSet
object with count matrix.
This function performs non-negative factorization using Bayesian algorithm
and gamma priors. Slots basis
, coeff
, and ranks
are filled.
When run with multiple values of ranks
, factorization is
repeated for each rank and the slot measure
contains
log evidence and optimal hyperparameters for each rank.
With nrun > 1
, the solution
with the maximum log evidence is stored for a given rank.
Object of class scNMFSet
with factorization slots filled.
1 2 3 4 5 | set.seed(1)
x <- simulate_whx(nrow=50,ncol=100,rank=5)
s <- scNMFSet(x$x)
s <- vb_factorize(s,ranks=seq(2,8),nrun=5)
plot(s)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.