getT: getT

Description Usage Arguments Details Value Author(s) References Examples

View source: R/supervised_NMF.R

Description

getT is used to calculate the combined feature matrix.

Usage

1
getT(data,y,Tr1,Tr2)

Arguments

data

an optional n by p count data matrix. The p columns of the matrix are different variables and the n rows are samples. Each column should contain at lest one none zero entry. When n = 1, it is a row vector.

y

a binary variable contains classification information of the data. Usually one group is labelled as "0" and the other as "1".

Tr1

a value gives the number of types for class labeled as 1. The appropriate Tr1 can also be estimated from function chty.

Tr2

a value gives the number of types for class labeled as 0. The appropriate Tr2 can also be estimated from function chty.

Details

getT is used to calculate the combined feature matrix. The data used in getT should contain samples from both classes. If feature matrix is needed for only one class, basis(NMF(data; Tr; "KL")) can be used.

Value

T

a feature matrix in dimension p by r. It is a combined feature matrix contains information from both classes.

Author(s)

Yun Cai, Hong Gu and Tobby Kenney

References

Learning Microbial Community Structures with Supervised and Unsupervised Non-negative Matrix Factorization

Examples

1
2
3
#get feature matrix with rank 2 for one group and rank 3 for the other of the simualted spdata
y=c(rep(1,4),rep(0,4))
T.eg=getT(spdata,y,2,3)

SpNMF documentation built on May 2, 2019, 3:33 p.m.

Related to getT in SpNMF...