probly.conformal_prediction.scores.saps.common¶
Common for SAPS scores.
Functions
|
Register an implementation for a specific type. |
Classes
|
Sorted Adaptive Prediction Sets (SAPS) nonconformity score. |
- class probly.conformal_prediction.scores.saps.common.SAPSScore(model, lambda_val=0.1, random_state=42)[source]¶
Bases:
ClassificationScoreSorted Adaptive Prediction Sets (SAPS) nonconformity score.
- calibration_nonconformity(x_cal, y_cal, probs=None)¶
Compute calibration scores (vectorized, backend-agnostic).
- Parameters:
x_cal (Sequence[Any])
y_cal (Sequence[Any])
probs (Any | None)
- Return type:
npt.NDArray[np.floating]
- predict_nonconformity(x_test, probs=None)¶
Compute scores for all labels (stays on original device).
- Parameters:
x_test (Sequence[Any])
probs (Any | None)
- Return type:
Any
- rng: Generator¶