opendataval.dataval.Sampler#
- 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”.
- __init__()#
Methods
__init__
()compute_marginal_contribution
(*args, **kwargs)Given args and kwargs for the value func, computes marginal contribution.
set_coalition
(coalition)Given the coalition, initializes data structures to compute marginal contrib.
set_evaluator
(value_func)Sets the evaluator function to evaluate the utility of a coalition