| ConditionalSampler | R Documentation |
Base class for conditional sampling methods where features are sampled conditionally on other features. This is an abstract class that should be extended by concrete implementations.
xplainfi::FeatureSampler -> ConditionalSampler
new()Creates a new instance of the ConditionalSampler class
ConditionalSampler$new(task, conditioning_set = NULL)
task(mlr3::Task) Task to sample from
conditioning_set(character | NULL) Default conditioning set to use in $sample().
sample()Sample from stored task conditionally on other features.
ConditionalSampler$sample( feature, row_ids = NULL, conditioning_set = NULL, ... )
feature(character) Feature(s) to sample.
row_ids(integer() | NULL) Row IDs to use. If NULL, uses all rows.
conditioning_set(character | NULL) Features to condition on.
...Additional arguments passed to the sampler implementation.
Modified copy with sampled feature(s).
sample_newdata()Sample from external data conditionally.
ConditionalSampler$sample_newdata( feature, newdata, conditioning_set = NULL, ... )
feature(character) Feature(s) to sample.
newdata(data.table) External data to use.
conditioning_set(character | NULL) Features to condition on.
...Additional arguments passed to the sampler implementation.
Modified copy with sampled feature(s).
clone()The objects of this class are cloneable with this method.
ConditionalSampler$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.