This sampler implements what is called "marginal imputation" in the SAGE literature
(Covert et al. 2020). For each observation, it samples a complete row from reference
data and takes the specified feature values from that row. This approach:
Samples from the marginal distribution \(P(X_S)\) where S is the set of features
Preserves dependencies within the sampled reference row
Breaks dependencies between test and reference data
Terminology note: In SAGE literature, this is called "marginal imputation" because
features outside the coalition are "imputed" by sampling from their marginal distribution.
We use MarginalReferenceSampler to avoid confusion with missing data imputation and to
clarify that it samples from reference data.
Comparison with other samplers:
MarginalPermutationSampler: Shuffles each feature independently, breaking all row structure
MarginalReferenceSampler: Samples complete rows, preserving within-row dependencies
ConditionalSampler: Samples from \(P(X_S | X_{-S})\), conditioning on other features
Use in SAGE:
This is the default approach for MarginalSAGE. For a test observation x and features
to marginalize S, it samples a reference row x_ref and creates a "hybrid" observation
combining x's coalition features with x_ref's marginalized features.