Skip to contents

Computes the condition number of the data matrix. Lower values indicate better numerical stability for deconvolution.

Usage

compute_condition(data, use_cpp = getOption("darwin.use_cpp", TRUE))

Arguments

data

Numeric matrix (cell types x genes).

use_cpp

Use C++ implementation for speed. Default: TRUE.

Value

Condition number (ratio of largest to smallest singular value).

Examples

data <- matrix(rnorm(50), nrow = 5, ncol = 10)
cond <- compute_condition(data)