| inmf | R Documentation |
Performs integrative non-negative matrix factorization (iNMF) (J.D. Welch,
2019) to return factorized H, W, and V matrices. The
objective function is stated as
\arg\min_{H\ge0,W\ge0,V\ge0}\sum_{i}^{d}||E_i-(W+V_i)Hi||^2_F+
\lambda\sum_{i}^{d}||V_iH_i||_F^2
where E_i is the input non-negative matrix of the i'th dataset,
d is the total number of datasets. E_i is of size
m \times n_i for m features and n_i sample points,
H_i is of size k \times n_i, V_i is of size
m \times k, and W is of size m \times k.
inmf optimizes the objective with ANLS strategy, while
onlineINMF optimizes the same objective with an online learning
strategy.
inmf(
objectList,
k = 20,
lambda = 5,
niter = 30,
nCores = 2,
Hinit = NULL,
Vinit = NULL,
Winit = NULL,
verbose = FALSE
)
objectList |
list of input datasets. List elements should all be of the same class. Viable classes include: matrix, dgCMatrix, H5Mat, H5SpMat. |
k |
Integer. Inner dimensionality to factorize the datasets into.
Default |
lambda |
Regularization parameter. Larger values penalize
dataset-specific effects more strongly (i.e. alignment should increase as
|
niter |
Integer. Total number of block coordinate descent iterations to
perform. Default |
nCores |
The number of parallel tasks that will be spawned.
Default |
Hinit |
Initial values to use for |
Vinit |
Similar to |
Winit |
Initial values to use for |
verbose |
Logical scalar. Whether to show information and progress.
Default |
A list of the following elements:
H - a list of result H_i matrices of size
n_i \times k
V - a list of result V_i matrices
W - the result W matrix
objErr - the final objective error value.
Yichen Wang
Joshua D. Welch and et al., Single-Cell Multi-omic Integration Compares and Contrasts Features of Brain Cell Identity, Cell, 2019
library(Matrix)
set.seed(1)
result <- inmf(list(ctrl.sparse, stim.sparse), k = 10, niter = 10, verbose = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.