Skip to contents

Base class for implementing different sampling strategies for feature importance methods like PFI and CFI

Public fields

task

(mlr3::Task) Original task.

label

(character(1)) Name of the sampler.

param_set

(paradox::ParamSet) Parameter set for the sampler.

Methods


Method new()

Creates a new instance of the FeatureSampler class

Usage

FeatureSampler$new(task)

Arguments

task

(mlr3::Task) Task to sample from


Method sample()

Sample values for feature(s)

Usage

FeatureSampler$sample(feature, data)

Arguments

feature

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

data

(data.table ) Data to use for sampling context

Returns

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


Method clone()

The objects of this class are cloneable with this method.

Usage

FeatureSampler$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.