pydvl.valuation.methods.random
¶
This module implements a trivial random valuation method.
RandomValuation
¶
Bases: Valuation
A trivial valuation method that assigns random values to each data point.
Values are in the range [0, 1), as generated by ValuationResult.from_random.
Successive calls to fit() will generate different values.
Source code in src/pydvl/valuation/methods/random.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.
Source code in src/pydvl/valuation/base.py
fit
¶
fit(train: Dataset) -> Self
Dummy fitting that generates a set of random values.
Successive calls will generate different values.
PARAMETER | DESCRIPTION |
---|---|
train
|
used to determine the size of the valuation result
TYPE:
|
Returns: self