getT is used to calculate the combined feature matrix.
Usage
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.
Value
T
a feature matrix in dimension p by r. It is a combined feature matrix
contains information from both classes.
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.
References
Learning Microbial Community Structures with Supervised and Unsupervised Non-negative Matrix Factorization
# NOT RUN {#get feature matrix with rank 2 for one group and rank 3 for the other of the simualted spdatay=c(rep(1,4),rep(0,4))
T.eg=getT(spdata,y,2,3)
# }