dataeval.workflows.SufficiencyOutput

class dataeval.workflows.SufficiencyOutput

Output class for Sufficiency workflow.

steps

Array of sample sizes

Type:

NDArray

params

Inverse power curve coefficients for the line of best fit for each measure

Type:

Dict[str, NDArray]

measures

Average of values observed for each sample size step for each measure

Type:

Dict[str, NDArray]

inv_project(targets)

Calculate training samples needed to achieve target model metric values.

Parameters:
targets : Mapping[str, ArrayLike]

Mapping of target metric scores (from 0.0 to 1.0) that we want to achieve, where the key is the name of the metric.

Returns:

List of the number of training samples needed to achieve each corresponding entry in targets

Return type:

dict[str, NDArray]

plot(class_names=None)

Plotting function for data sufficience tasks

Parameters:
class_names : Sequence[str] | None, default None

List of class names

Returns:

List of Figures for each measure

Return type:

list[Figure]

Raises:

ValueError – If the length of data points in the measures do not match

project(projection)

Projects the measures for each value of X

Parameters:
projection : int | Iterable[int]

Step or steps to project

Returns:

Dataclass containing the projected measures per projection

Return type:

SufficiencyOutput

Raises:

ValueError – If the length of data points in the measures do not match If projection is not numerical