fit_batch_reference

fit_batch_reference(
    data,
    *,
    batch_col,
    covariates=(),
    protect=('condition', 'group'),
    min_batch=MIN_BATCH,
)

Fit the frozen global parameters on a reference cohort.

Parameters

Name Type Description Default
covariates Sequence[str] Columns of obs whose effect should be preserved rather than removed – typically age and sex. Numeric columns enter as themselves; categorical ones as dummies. ()
protect Sequence[str] Columns checked for being nested inside batch. See :func:_check_confounding; pass () to skip. ('condition', 'group')