Skip to contents

Apply Fitted ComBat Harmonisation Parameters Without Test-Set Leakage

Usage

combat_apply(fit, features, batch, mod = NULL)

Arguments

fit

A "dicom_combat_fit" from combat_fit().

features

Numeric matrix (n_features x n_samples).

batch

Factor or character vector of batch labels matching fit$batch_levels.

mod

Optional biological covariate matrix (n_samples x q).

Value

Harmonized numeric matrix of dimensions dim(features).