pydvl.reporting.scores
¶
compute_removal_score
¶
compute_removal_score(
u: Utility,
values: ValuationResult,
percentages: Union[NDArray[float_], Iterable[float]],
*,
remove_best: bool = False,
progress: bool = False
) -> Dict[float, float]
Fits model and computes score on the test set after incrementally removing a percentage of data points from the training set, based on their values.
PARAMETER | DESCRIPTION |
---|---|
u |
Utility object with model, data, and scoring function.
TYPE:
|
values |
Data values of data instances in the training set.
TYPE:
|
percentages |
Sequence of removal percentages. |
remove_best |
If True, removes data points in order of decreasing valuation.
TYPE:
|
progress |
If True, display a progress bar.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Dict[float, float]
|
Dictionary that maps the percentages to their respective scores. |