Implements marginal sampling for PFI, where the feature of interest is sampled independently of other features
Super class
xplainfi::FeatureSampler
-> MarginalSampler
Methods
Inherited methods
Method new()
Creates a new instance of the MarginalSampler class
Usage
MarginalSampler$new(task)
Arguments
task
(mlr3::Task) Task to sample from
Method sample()
Sample from stored task by permutation (marginal distribution).
Arguments
feature
(
character
) Feature(s) to sample.row_ids
(
integer()
|NULL
) Row IDs to use. IfNULL
, uses all rows.
Method sample_newdata()
Sample from external data by permutation. See $sample()
for details.
Arguments
feature
(
character
) Feature(s) to sample.newdata
(
data.table
) External data to use.