class opendataval.dataval.Sampler(*args, **kwargs)#

Abstract Sampler class for marginal contribution based data evaluators.

Many marginal contribution based data evaluators depend on a sampling method as they typically can be very computationally expensive. The Sampler class provides a blue print of required methods to be used and the following samplers provide ways of caching computed marginal contributions if given a “cache_name”.




compute_marginal_contribution(*args, **kwargs)

Given args and kwargs for the value func, computes marginal contribution.


Given the coalition, initializes data structures to compute marginal contrib.


Sets the evaluator function to evaluate the utility of a coalition