Run NMF on a sparse matrix with automatic rank determination by cross-validation
Arguments
- A
sparse matrix (ideally variance-stabilized) of data for genes x cells (rows x columns)
- rank
factorization rank
- tol
tolerance of the fit (1e-5 for publication quality, 1e-3 for cross-validation)
- maxit
maximum number of iterations
- verbose
verbosity level
- L1
L1/LASSO penalty to increase sparsity of model
- L2
L2/Ridge penalty to increase angles between factors
- threads
number of threads for parallelization across CPUs, 0 = use all available threads