pydvl.valuation.methods.loo
¶
This module implements Leave-One-Out (LOO) valuation.
This is the simplest example of marginal-contribution-based valuation method. It is defined as:
where \(U\) is the utility function, \(I\) is the set of all data points, and \(i\) is the data point of interest.
Strictly speaking, LOO can be seen as a [semivalue][pydvl.valuation.semivalue] where the coefficients are zero except for \(k=|D|-1\),
LOOValuation
¶
LOOValuation(utility: UtilityBase, progress: bool = False)
Bases: SemivalueValuation
Computes LOO values for a dataset.
Source code in src/pydvl/valuation/methods/loo.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 before returning it.
TYPE:
|
Returns: The result of the valuation.
Source code in src/pydvl/valuation/base.py
coefficient
¶
This is never actually used to filter out sets, because the LOOSampler returns only complements of {idx}, but it is required by the abstract class.