A KnockoffSampler defaulting to second-order Gaussian knockoffs
as created by seqknockoff::knockoffs_seq.
Details
This is equivalent to KnockoffSampler using knockoff_fun = seqknockoff::knockoffs_seq.
References
Watson D, Wright M (2021). “Testing Conditional Independence in Supervised Learning Algorithms.” Machine Learning, 110(8), 2107–2129. doi:10.1007/s10994-021-06030-6 .
Blesch K, Watson D, Wright M (2023). “Conditional Feature Importance for Mixed Data.” AStA Advances in Statistical Analysis, 108(2), 259–278. doi:10.1007/s10182-023-00477-9 .
Super classes
xplainfi::FeatureSampler -> xplainfi::KnockoffSampler -> KnockoffSequentialSampler
Public fields
feature_types(
character()) Feature types supported by the sampler. Will be checked against the provied mlr3::Task to ensure compatibility.x_tildeKnockoff matrix
Methods
Method new()
Creates a new instance using sequential knockoffs via seqknockoff::knockoffs_seq.
Usage
KnockoffSequentialSampler$new(task, iters = 1)Arguments
task(mlr3::Task) Task to sample from.
iters(
integer(1): 1) Number of repetitions theknockoff_funis applied to create multiplex_tildeinstances per observation.
Examples
if (FALSE) { # \dontrun{
# Requires seqknockoff (https://github.com/kormama1/seqknockoff)
task = tgen("simplex")$generate(n = 100)
sampler_seq = KnockoffSampler$new(task)
sampled_seq = sampler_seq$sample("x1")
} # }