flashier.utils: Transparent Interpretation of Empirical Bayes Matrix Factorizations
Source:R/flashier.utils-package.R
flashier.utils-package.RdFit or import a 'flashier' matrix factorization, standardize it into a named
view (samples by factors activity, features by factors effects), then interpret,
compare, validate and transfer the factors. Start with
fit_ebmf() and standardize_factors(); the site's
Get started tutorial walks through the workflow.
Details
Every exported function's reference page names its original authors;
factor_provenance() returns the audited source registry. Full credits:
https://github.com/mdmanurung/flashier-utils/blob/main/CREDITS.md.
Conventions
Character arguments that take one of a fixed set of values, such as
sample_side or scaling, are case-sensitive and checked with
match.arg(). Group columns in metadata may be factors or character;
factor level order is ignored and only the grouping is used. Only dimnames
of an input matrix are kept; other attributes are dropped. Outputs hold no
NA or Inf unless a function's documentation says so.
Glossary
- view
A named
factor_representation: samples by factors activity and features by factors effects that share factor columns and reconstruct the fit.- activity, effects
The sample-side and feature-side loadings of each factor.
- sample_side
Whether samples are the
"rows"or the"columns"of the fitted matrix.- scaling
The coordinate choice for factors:
"ldf"(unit-norm factors),"raw"(flashier's own) or"rms"(unit root-mean-square activity). A scaling changes units, not the fitted model.- PVE
Proportion of variance explained as flashier computes it. It is not a unique variance decomposition and not held-out prediction.
- lfsr
Local false sign rate, the posterior probability that the sign of an effect is wrong (Stephens 2017). Reported only for the EB-SNMF point estimates that carry it.
- specificity
A descriptive one-versus-rest measure of how concentrated a factor's activity is in a group; see
factor_specificity().- congruence
Tucker congruence, the cosine similarity of two factors' effect vectors on shared named features; see
factor_replicability().