probly.representation.credal_set.common

Common class representing credal sets.

Classes

CategoricalCredalSet()

Base class for credal sets.

ConvexCredalSet()

A credal set defined by the convex hull of a set of distributions.

CredalSet()

Base class for credal sets.

DiscreteCredalSet()

A credal set over a finite set of distributions.

DistanceBasedCredalSet()

A credal set defined by a distance metric around a central distribution.

ProbabilityIntervalsCredalSet()

A credal set defined by probability intervals over outcomes.

SingletonCredalSet()

A credal set containing a single distribution.

class probly.representation.credal_set.common.CategoricalCredalSet[source]

Bases: CredalSet, Generic

Base class for credal sets.

abstractmethod classmethod from_sample(sample, distribution_axis=-1)[source]

Create a credal set from a finite sample.

Parameters:
  • sample (Sample[T]) – The sample to create the credal set from.

  • distribution_axis (int) – The axis containing the categorical probabilities.

Returns:

The created credal set.

Return type:

Self

lower()[source]

Compute the lower envelope of the credal set.

Return type:

T

upper()[source]

Compute the upper envelope of the credal set.

Return type:

T

type: CredalSetType = 'categorical'
class probly.representation.credal_set.common.ConvexCredalSet[source]

Bases: CategoricalCredalSet, Generic

A credal set defined by the convex hull of a set of distributions.

abstractmethod classmethod from_sample(sample, distribution_axis=-1)

Create a credal set from a finite sample.

Parameters:
  • sample (Sample[T]) – The sample to create the credal set from.

  • distribution_axis (int) – The axis containing the categorical probabilities.

Returns:

The created credal set.

Return type:

Self

lower()

Compute the lower envelope of the credal set.

Return type:

T

upper()

Compute the upper envelope of the credal set.

Return type:

T

type: CredalSetType = 'categorical'
class probly.representation.credal_set.common.CredalSet[source]

Bases: ABC

Base class for credal sets.

type: CredalSetType
class probly.representation.credal_set.common.DiscreteCredalSet[source]

Bases: CategoricalCredalSet, Generic

A credal set over a finite set of distributions.

abstractmethod classmethod from_sample(sample, distribution_axis=-1)

Create a credal set from a finite sample.

Parameters:
  • sample (Sample[T]) – The sample to create the credal set from.

  • distribution_axis (int) – The axis containing the categorical probabilities.

Returns:

The created credal set.

Return type:

Self

lower()

Compute the lower envelope of the credal set.

Return type:

T

upper()

Compute the upper envelope of the credal set.

Return type:

T

type: CredalSetType = 'categorical'
class probly.representation.credal_set.common.DistanceBasedCredalSet[source]

Bases: CategoricalCredalSet, Generic

A credal set defined by a distance metric around a central distribution.

abstractmethod classmethod from_sample(sample, distribution_axis=-1)

Create a credal set from a finite sample.

Parameters:
  • sample (Sample[T]) – The sample to create the credal set from.

  • distribution_axis (int) – The axis containing the categorical probabilities.

Returns:

The created credal set.

Return type:

Self

lower()

Compute the lower envelope of the credal set.

Return type:

T

upper()

Compute the upper envelope of the credal set.

Return type:

T

type: CredalSetType = 'categorical'
class probly.representation.credal_set.common.ProbabilityIntervalsCredalSet[source]

Bases: CategoricalCredalSet, Generic

A credal set defined by probability intervals over outcomes.

abstractmethod classmethod from_sample(sample, distribution_axis=-1)

Create a credal set from a finite sample.

Parameters:
  • sample (Sample[T]) – The sample to create the credal set from.

  • distribution_axis (int) – The axis containing the categorical probabilities.

Returns:

The created credal set.

Return type:

Self

lower()

Compute the lower envelope of the credal set.

Return type:

T

upper()

Compute the upper envelope of the credal set.

Return type:

T

type: CredalSetType = 'categorical'
class probly.representation.credal_set.common.SingletonCredalSet[source]

Bases: DiscreteCredalSet, Generic

A credal set containing a single distribution.

abstractmethod classmethod from_sample(sample, distribution_axis=-1)

Create a credal set from a finite sample.

Parameters:
  • sample (Sample[T]) – The sample to create the credal set from.

  • distribution_axis (int) – The axis containing the categorical probabilities.

Returns:

The created credal set.

Return type:

Self

lower()

Compute the lower envelope of the credal set.

Return type:

T

upper()

Compute the upper envelope of the credal set.

Return type:

T

type: CredalSetType = 'categorical'