Skip to contents

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.

Super class

xplainfi::FeatureSampler -> ConditionalSampler

Methods


Method new()

Creates a new instance of the ConditionalSampler class

Usage

Arguments

task

(mlr3::Task) Task to sample from


Method sample()

Sample values for feature(s) conditionally on other features

Usage

ConditionalSampler$sample(feature, data, conditioning_set = NULL)

Arguments

feature

(character) Feature name(s) to sample (can be single or multiple)

data

(data.table ) Data containing conditioning features

conditioning_set

(character) Features to condition on (default: all other features)

Returns

Modified copy of the input data with the feature(s) sampled conditionally


Method clone()

The objects of this class are cloneable with this method.

Usage

ConditionalSampler$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.