Run LNMF, initialized from any NMF model, where factors may be "linked" to certain samples.
Usage
run_linked_nmf(
A,
w,
link_h = NULL,
link_w = NULL,
tol = 1e-04,
maxit = 100,
verbose = TRUE,
L1 = 0.01,
L2 = 0,
threads = 0
)
Arguments
- A
sparse matrix (ideally variance-stabilized) of data for genes x cells (rows x columns)
- w
initial matrix for 'w', usually taken from the result of
run_nmf
, of dimensionsnrow(A) x rank
.- link_h
matrix giving the linkage weight (usually in the range
(0, 1)
) of dimensionsrank x ncol(A)
.- link_w
matrix giving the linkage weight of dimensions
nrow(A) x 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