NumpyCategoricalCredalSet

class probly.representation.credal_set.numpy.NumpyCategoricalCredalSet(*args, **kwargs)[source]

Bases: CategoricalCredalSet

Base class for NumPy-backed categorical credal sets.

abstract property barycenter: T

Return the barycenter of the credal set.

abstractmethod classmethod from_numpy_sample(sample: NumpySample[NumpyCategoricalDistribution]) → Self[source]

Create a credal set from categorical distribution samples.

classmethod from_sample(sample: Sample[NumpyCategoricalDistribution]) → Self[source]

Create a credal set from a sample of categorical distributions.

abstractmethod lower() → ndarray[source]

Return the lower probabilities of the credal set.

abstract property num_classes: int

Return the number of classes in the credal set.

type: ClassVar[Literal['categorical']] = 'categorical'
abstractmethod upper() → ndarray[source]

Return the upper probabilities of the credal set.