FiltLoss {PERFect} | R Documentation |
Sequential filtering loss calculation for removing a set of J_j taxa for J= 1, ..., p.
FiltLoss(X, Order = "NP", Order.user = NULL, type = "Cumu", Plot = TRUE)
X |
OTU table, where taxa are columns and samples are rows of the table. It should be a in data frame format with columns corresponding to taxa names. |
Order |
Taxa ordering. The default ordering is the number of occurrences (NP) of the taxa in all samples.
Other types of order are number of connected taxa and weighted number of connected taxa,
denoted as |
Order.user |
User's taxa ordering. This argument takes a character vector of ordered taxa names. |
type |
Type of filtering loss calculation.
|
Plot |
Binary TRUE/FALSE value. If TRUE, the function returns plot of sequential differences in filtering loss. |
The individual filtering loss due to removing one taxon j is defined as:
FL_u(j)= 1- (||X^T_-j X_-j||_F^2/||X^TX||_F^2),
where X_-j is the matrix X without column corresponding to jth taxon and ||Z||_F is the Frobenious norm of a matrix Z.
The cumulative filtering loss due to removing a set of taxa is defined as:
FL(J)= 1- (||X^T_-J X_-J||_F^2\||X^TX||_F^2),
where X_-J is the n x (p-|J|) dimensional matrix obtained by removing the columns indexed by the set J from the data matrix X.
The cumulative filtering loss is calculated sequentially for each set of taxa J_j, j=1, ..., p.
FL |
Filtering loss values. |
p_FL |
Plot of filtering loss values. |
Ekaterina Smirnova
Smirnova, E., Huzurbazar, H., Jafari, F. “PERFect: permutation filtration of microbiome data", to be submitted.
data(mock2) # Proportion data matrix Prop <- mock2$Prop # Counts data matrix Counts <- mock2$Counts #Calculate cumulative filtering loss FL <- FiltLoss(X=Prop, Order = "NP", type = "Cumu", Plot = TRUE) #Differences in filtering loss values FL$FL #Plot of the differences in filtering loss FL$p_FL