Conformal#

class torch_uncertainty.post_processing.Conformal(alpha, model, ts_init_val, ts_lr, ts_max_iter, enable_ts, device)[source]#

Conformal base class.

Warning

This implementation only works in the multiclass setting. Raise an issue if binary is needed.

abstract conformal(inputs)[source]#

Apply the conformal prediction rule to the inputs.

Return type:

Tensor

abstract fit(dataloader)#

Fit the post-processing module on a calibration dataloader.

Return type:

None

model_forward(inputs)[source]#

Apply the model and return the scores.

Return type:

Tensor