CFITTransfer: Transfer the learned gene expression signature onto a new...

Description Usage Arguments Value

View source: R/data_transfer.R

Description

Estimate the data specific parameters through Iterative Nonnegative Matrix Factorization (iNMF), by minimizing the objective function

1/n||X -(HW^TΛ + 1_n b^T)||_F^2

.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
CFITTransfer(
  Xtarget,
  Wref,
  max.niter = 100,
  tol = 1e-05,
  init = NULL,
  future.plan = c("multicore", "sequential", "transparent", "multisession", "cluster"),
  workers = parallel::detectCores() - 1,
  seed = 0,
  verbose = T
)

Arguments

Xtarget

An ncells-by-ngenes gene expression matrix

Wref

An ngenes-by-r reference low dimensional factor matrix

max.niter

integer, max number of iterations (default 100).

tol

numeric scalar, tolerance used in stopping criteria (default 1e-5).

init

a list of parameters for parameter initialization: lambda, b, H

future.plan

plan for future parallel computation, can be chosen from 'sequential','transparent','multicore','multisession' and 'cluster'. Note that Rstudio does not support 'multicore'.

workers

additional parameter for future::plan(), in cases of 'multicore','multisession' and 'cluster'.

seed

random seed used (default 0)

verbose

boolean scalar, whether to show extensive program logs (default TRUE)

Value

a list containing

H

estimated factor loading matrix of size ncells-by-r

b

estimated shift vector of size p (ngenes)

lambda

estimated scaling vector of size p (ngenes)

convergence

boolean, whether the algorithm converge

obj

numeric scalar, value of the objective function at convergence or when maximum iteration achieved

niter

integer, the iteration at convergence (or maximum iteration if not converge)

delta

numeric scalar, the relative difference in last objective update

params

list of parameters used for the algorithm: max.iter, tol, nrep


pengminshi/cFIT documentation built on July 11, 2021, 11:12 p.m.