probly.representer.credal_ensembler.torch.torch_compute_credal_ensembling_set

probly.representer.credal_ensembler.torch.torch_compute_credal_ensembling_set(sample: TorchSample[TorchCategoricalDistribution], alpha: float, distance: str) TorchSample[TorchCategoricalDistribution][source]

This function constructs a set of distributions based on [NZD25].

In general, a distribution is included in the set if it is in the top (1 - alpha) fraction of distributions closest to a representative distribution according to a specified distance metric.

Parameters:
  • sample – A sample containing the predicted probabilities from the ensemble members.

  • alpha – A float in the range [0, 1] that controls the size of the representative set. A value of 0 means all distributions are included, while a value of 1 means only the single closest distribution is included.

  • distance – A string specifying the distance metric to use for determining closeness.