peppr.TopSelector#

class peppr.TopSelector(k: int)[source]#

Selector that returns the best value from the k values with highest confidence.

Parameters:
kint

The best value is chosen from the k most confident predictions.

select(values: ndarray, smaller_is_better: bool) float#

Select the representative metric value from a set of poses.

The meaning of ‘representative’ depends on the specific Selector subclass.

ABSTRACT: Must be overridden by subclasses.

Parameters:
valuesndarray, shape=(n,), dtype=float

The metric values to select from. May contain NaN values. The values are sorted from highest to lowest confidence.

smaller_is_betterbool

Whether the smaller value is considered a better prediction.

Returns:
float

The selected value.