This function first average the feature value of all time points for each subject to form a subject by feature matrix. Next, it performs a singular value decomposition of this matrix and construct the matrix's rank-r approximation. Then, it subtracts this rank-r subject by feature matrix from the temporal tensor.
svd_centralize(datlist, r = 1)A list of results.
The new temporal tensor after mean structure is removed.
The subject singular vector of the mean structure, a subject by r matrix.
The feature singular vector of the mean structure, a feature by r matrix.
The singular value of the mean structure, a length r vector.
A length n list of matrices. Each matrix represents a subject, with columns representing samples from this subject, the first row representing the sampling time points, and the following rows representing the feature values.
The number of ranks in the mean structure. Default is 1.
Shi P, Martino C, Han R, Janssen S, Buck G, Serrano M, Owzar K, Knight R, Shenhav L, Zhang AR. (2023) Time-Informed Dimensionality Reduction for Longitudinal Microbiome Studies. bioRxiv. doi: 10.1101/550749. https://www.biorxiv.org/content/10.1101/550749.
Examples can be found in tempted.