Skip to main content

apply_split_absolute_residual

Function apply_split_absolute_residual 

Source
pub fn apply_split_absolute_residual(
    point_predictions: &[Vec<f64>],
    quantiles: &[SplitConformalQuantile],
    multi_target_policy: ConformalMultiTargetPolicy,
) -> Result<Vec<RegressionConformalInterval>, ConformalError>
Expand description

Apply calibrated radii to a finite multi-target prediction matrix.

Quantile coverages and ranks must be ordered, and radii must be nested. A finite bound overflow is rejected rather than converted into an unbounded interval, preserving the distinction between arithmetic failure and the explicit small-sample policy. Finite endpoints are the correctly rounded binary64 conversions of Decimal(repr(point)) +/- Decimal(repr(radius)), as frozen by W0. The two decimal operations are rounded independently; their rendered binary64 values therefore need not reconstruct an exact decimal midpoint or width after a second arithmetic operation. A finite non-zero radius is rejected only when both canonical endpoint conversions collapse to the same binary64 value.