jrSiCKLSNMF: Run jrSiCKLSNMF outside of a SickleJr object

View source: R/RcppExports.R

jrSiCKLSNMFR Documentation

Run jrSiCKLSNMF outside of a SickleJr object

Description

Perform joint non-negative matrix factorization (NMF) across multiple modalities of single-cell data. To measure the discrepancy between two distributions, one can use the Poisson Kullback-Leibler divergence (\mathtt{diffFunc}=\mathtt{"klp"}) or the Frobenius norm (\mathtt{diffFunc}=\mathtt{"fr"}). It is also possible to set graph regularization constraints on \mathbf{W}^v and either a sparsity constraint on \mathbf{H} or an L2 norm constraint on the rows of \mathbf{H}. This function passes by reference and updates the variables \mathtt{WL} and \mathtt{H} and does not require data to be in an object of type SickleJr. \mathtt{RunjrSiCKLSNMF} calls this function. If your data are in an object of class SickleJr, please use the \mathtt{RunjrSiCKLSNMF} function instead.

Usage

jrSiCKLSNMF(
  datamatL,
  WL,
  H,
  AdjL,
  DL,
  lambdaWL,
  lambdaH,
  initsamp,
  suppress_warnings,
  diffFunc = "klp",
  Hconstraint = "None",
  differr = 1e-06,
  rounds = 1000L,
  display_progress = TRUE,
  minibatch = TRUE,
  batchsize = 100L,
  random_W_updates = TRUE,
  minrounds = 100L
)

Arguments

datamatL

An R list where each entry contains a normalized, sparse \mathbf{X}^v matrix corresponding to single-cell modality v

WL

An R list containing initialized values of the \mathbf{W}^v within each modality v

H

A matrix containing initialized values for the shared \mathbf{H}

AdjL

An R list containing all of the adjacency matrices for the feature-feature similarity graphs in sparse format; note that \mathtt{D-Adj} is the graph Laplacian

DL

An R list containing all of the degree matrices of the feature-feature similarity graphs; note that \mathtt{D-Adj} is the graph Laplacian

lambdaWL

A list of the \lambda_{\mathbf{W}^v} corresponding to modality v

lambdaH

A double containing the desired value for \lambda_{\mathbf{H}}

initsamp

A vector of randomly selected rows of \mathtt{H} on which to run the objective function

suppress_warnings

A Boolean that indicates whether warnings should be suppressed

diffFunc

A string indicating what type of divergence to use; set to the Poisson Kullback-Leibler divergence (\mathtt{``klp"}) by default, but the Frobenius norm (\mathtt{``fr"}) is also available

Hconstraint

A string that indicates whether you want to set an L2 norm constraint on the rows of \mathbf{H}. Enter 'None' for no constraints or 'L2Norm' to set the L2 norm of each row of \mathbf{H} to 1

differr

A double containing the tolerance

rounds

A double containing the number of rounds

display_progress

A Boolean indicating whether to display the progress bar

minibatch

A Boolean indicating whether to use the mini-batch version of the algorithm

batchsize

Number of batches for mini-batch updates

random_W_updates

A Boolean indicating whether to update \mathbf{W}^v once per epoch (TRUE) or after every update of the subset of \mathbf{H} (FALSE) for the mini-batch algorithm.

minrounds

A minimum number of rounds for the algorithm to run: most useful for the mini-batch algorithm

Value

An R list containing values for the objective function.

References

\insertRef

Cai2008jrSiCKLSNMF

\insertRef

jnmf2009jrSiCKLSNMF

\insertRef

Eddelbuettel2011jrSiCKLSNMF

\insertRef

Eddelbuettel2014jrSiCKLSNMF

\insertRef

Elyanow2020jrSiCKLSNMF

\insertRef

halfbakednmfjrSiCKLSNMF

\insertRef

Lee1999jrSiCKLSNMF

\insertRef

Liu2013jrSiCKLSNMF


jrSiCKLSNMF documentation built on Aug. 12, 2025, 1:08 a.m.