probly.conformal_prediction.scores.absolute_error.common

Absolute Error Score implementation.

Functions

register(cls, func)

Register an implementation for a specific type.

Classes

AbsoluteErrorScore(model)

Standard absolute residual score: |y - y_hat|.

class probly.conformal_prediction.scores.absolute_error.common.AbsoluteErrorScore(model)[source]

Bases: RegressionScore

Standard absolute residual score: |y - y_hat|.

Parameters:

model (Predictor)

calibration_nonconformity(x_cal, y_cal, y_pred=None)

Compute calibration scores.

Parameters:
  • x_cal (Sequence[Any])

  • y_cal (Sequence[Any])

  • y_pred (Any | None)

Return type:

npt.NDArray[np.floating]

construct_intervals(y_hat, threshold)

Construct prediction intervals (Preserves backend).

Parameters:
Return type:

Any

predict_nonconformity(x_test)

For regression, return predictions for interval construction.

Parameters:

x_test (Sequence[Any])

Return type:

Any

probly.conformal_prediction.scores.absolute_error.common.register(cls, func)[source]

Register an implementation for a specific type.

Parameters:
  • cls (LazyType)

  • func (Callable)

Return type:

None