probly.conformal_prediction.utils.metrics¶
Utility functions for evaluating conformal prediction metrics.
Functions
|
Compute average size of prediction sets. |
|
Compute empirical coverage of prediction sets. |
- probly.conformal_prediction.utils.metrics.average_set_size(prediction_sets)[source]¶
Compute average size of prediction sets.
- probly.conformal_prediction.utils.metrics.empirical_coverage(prediction_sets, true_labels)[source]¶
Compute empirical coverage of prediction sets.
- Parameters:
- Returns:
Empirical coverage as a float.
- Raises:
ValueError – If the number of instances in prediction_sets and true_labels do not match.
- Return type: