
Bayesian PCA on a matrix with missing values
rs_bpca.Rd
Port of
bpca() from pcaMethods. Variational Bayes with an ARD prior per
component, so superfluous components shrink towards zero. Deterministic,
the start comes from an SVD.
Arguments
- x
Numeric matrix. Rows = samples, columns = features.
NAmarks a missing value.- bpca_params
List. The BPCA parameters, see
params_bpca().- verbose
Integer.
0L- quiet;1L- normal verbosity;2L- detailed verbosity.
Value
A list with:
scores - Samples x
n_pcs.loadings - Features x
n_pcs, not orthonormal.r2_cum - Cumulative R^2 per component on the observed entries.
centre - Column centres that were subtracted.
scale - Column scales that were divided out.
completed -
xwith the missing entries imputed.noise_var - Residual variance,
1 / tau.n_iter - Variational steps run.
converged - Whether
tolwas reached beforemax_iter.