pydvl.valuation.methods.beta_shapley
¶
BetaShapleyValuation
¶
BetaShapleyValuation(
utility: UtilityBase,
sampler: IndexSampler,
is_done: StoppingCriterion,
alpha: float,
beta: float,
progress: bool = False,
skip_converged: bool = False,
)
Bases: SemivalueValuation
Computes Beta-Shapley values.
PARAMETER | DESCRIPTION |
---|---|
utility
|
Object to compute utilities.
TYPE:
|
sampler
|
Sampling scheme to use.
TYPE:
|
is_done
|
Stopping criterion to use.
TYPE:
|
skip_converged
|
Whether to skip converged indices. Convergence is determined
by the stopping criterion's
TYPE:
|
alpha
|
The alpha parameter of the Beta distribution.
TYPE:
|
beta
|
The beta parameter of the Beta distribution.
TYPE:
|
progress
|
Whether to show a progress bar. If a dictionary, it is passed to
TYPE:
|
Source code in src/pydvl/valuation/methods/beta_shapley.py
values
¶
values(sort: bool = False) -> ValuationResult
Returns a copy of the valuation result.
The valuation must have been run with fit()
before calling this method.
PARAMETER | DESCRIPTION |
---|---|
sort
|
Whether to sort the valuation result by value before returning it.
TYPE:
|
Returns: The result of the valuation.