mod pca

module pca

pca command: streaming PCA of the depth matrix.

Functions

fn rank1_upper_update_sparse(gram: &mut [f64], mean: &mut [f64], depths: &[u16], n: usize)

Sparse rank-1 outer product for highly zero depth rows (exact). Exposed for microbenchmarks; production PCA uses the dense inlined loop above.

fn run(params: &PcaParams) -> Result<(), Box<dyn std::error::Error>>
fn run_to_arrow(params: &PcaParams) -> Result<PcaArrowResult, Box<dyn std::error::Error>>
fn run_to_arrow_with_source<S: MarkerStream>(source: &S, params: &PcaParams) -> Result<PcaArrowResult, Box<dyn std::error::Error>>
fn run_with_source<S: MarkerStream>(source: &S, params: &PcaParams) -> Result<(), Box<dyn std::error::Error>>

Structs and Unions

struct PcaArrowResult
eigenvalues: RecordBatch
loadings: RecordBatch
n_markers: u64
n_individuals: usize
n_components: usize
total_variance: f64
struct PcaParams
markers_table_path: String
output_dir: String
min_depth: u16
n_components: Option<usize>
backend: crate::compute_backend::PValueBackend

Where the Gram accumulation runs.