NMF_RNA_Tang_ind: NMF core function

Description Usage Arguments Value Examples

Description

'NMF_RNA_Tang_ind' is a upper level wrapper function for 'NMF_RNA_Tang'. On top of core NMF, it also initialtes $W$ and $H$, and scales/normalizes according to the input arguments: scale_Data and reg_para. Besides, it also does random permutations to check results stability and helps choose the best parameters. Although it has full sets of NITUMID's functions, the 'NMF_RNA_Tang_ind' is still not supposed to be run independently, has hyper-function will call it with different parameters choices.

Usage

1
2
3
NMF_RNA_Tang_ind(Y, lam_W, beta_W, A, eta, tol = 10^-5, prterr = F,
  max.itr = 2000, always = F, num_cell = 11, scale_Data,
  perm_type = T)

Arguments

Y

Y is the gene expression matrix that has #signature genes rows and #samples columns

lam_W

$\lambda$ is the parameter imposing A's structure into resulting W, see our paper for more info. In real calculation, upper level functions will automatically choose suitable $\lambda$ no need to set by yourself

beta_W

$\beta$ is the parameter controlling sparsity ridge penalty, see our paper for more information. In real calculation, upper level functions will automatically choose suitable $\beta$ no need to set by yourself

A

The trichotomous guide matrix A

eta

$\eta$ is the parameter for ensuring column sums of H are 1s, upper level function will choose suitable $\eta$ automatically, no need to spcify yourself

tol

numeric scalar, the cutoff value for stop iterating, default $10^-5$

prterr

logical value indicating if it should print each step's error, default FALSE

max.itr

numerical scalar, maximum iteration number, default 2000

num_cell

numeric scalar, number of component cell types, dfault 11. Noted that if you were to change component cell types number, you should change your $A$ matrix accordingly.

scale_Data

the parameter controlling which scaling method to use for $Y$: 0 indicates no scaling, 1 indicates scaling $||Y||_F=\sqrtnm$, where $n,m$ are dimensions of Y; 2 indicates scaling such that $||Y^scaled||_F=||log(Y^raw+1)||_F$

perm_type

logical variable, default TRUE. If TRUE, the function will do a permutation and measure consistency between results.

ini.W

Initial W matrix

ini.H

Initial H matrx

alaways

logical, if it should output results whatsover when max.itr is reached, default TRUE

Value

'NMF_RNA_Tang' returns the resulted W and H, as well as track of errors along iteration

Examples

1
2
This function is not supposed to be run independently, it is supposed to be called by top level function, which will feed it with different pre-determined
parameters and choose thr best one

tdw1221/NITUMID documentation built on May 31, 2019, 1:54 a.m.