ott.tools.conformal.OTCP

Contents

ott.tools.conformal.OTCP#

class ott.tools.conformal.OTCP(model, nonconformity_fn=<built-in function sub>, sinkhorn_output=None, offset=0.0, scale=1.0, calibration_scores=None)[source]#

Optimal transport conformal prediction [Klein et al., 2025].

Parameters:

Methods

calibrate(x, y)

Compute calibration scores.

fit_transport(x, y[, epsilon, n_target, ...])

Fit the transport map.

get_scores(x, y)

Compute nonconformity scores.

nonconformity_fn(b, /)

Same as a - b.

predict(x[, y_candidates, alpha])

Conformalize the model's prediction.

Attributes

calibration_scores

offset

scale

sinkhorn_output

target_measure

Target measure of shape [n_target, dim_y].

model