probly.representation.credal_set.array.ArrayCategoricalCredalSet

class probly.representation.credal_set.array.ArrayCategoricalCredalSet(*args, **kwargs)[source]

Bases: CategoricalCredalSet, ABC

Base class for NumPy-backed categorical credal sets.

abstract property barycenter: T

Return the barycenter of the credal set.

abstractmethod classmethod from_array_sample(sample: ArraySample[ArrayCategoricalDistribution]) Self[source]

Create a credal set from categorical distribution samples.

classmethod from_sample(sample: Sample[ArrayCategoricalDistribution]) 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: CredalSetType = 'categorical'
abstractmethod upper() ndarray[source]

Return the upper probabilities of the credal set.