choose_k: Decide the rank of the truncated SVD based on Linderman 2018...

Description Usage Arguments Value

Description

Adpated from https://github.com/KlugerLab/ALRA/blob/master/alra.R Heuristic for choosing rank k for the low rank approximation based on statistics of the spacings between consecutive singular values. Finds the smallest singular value $\sigma_i$ such that $\sigma_i - \sigma_i-1$ is significantly different than spacings in the tail of the singular values.

Usage

1
choose_k(A, K = 100, pval_thresh = 1e-10, noise_start = 80, q = 2)

Arguments

A

array_like;
a real/complex (m, n) input matrix (or data frame) to be decomposed.

pval_thresh

The threshold for “significance”

noise_start

Index for which all smaller singular values are considered noise

q

integer, optional;
number of additional power iterations (by default q=2).

n

Number of resampling iteration

Value

A list with three items: Chosen k, P values of each possible k, singular values of the matrix A


Mamie/scDNAmClock documentation built on Aug. 20, 2019, 7 p.m.