DiscreteDistribution

class DiscreteDistribution[source]

Bases: Distribution

Base class for representing discrete probability distributions.

abstract classmethod cdf(*args, **kwargs) Tensor[source]

Computes the cumulative distribution function.

Returns:

resulting cumulative probabilities.

Return type:

torch.Tensor

Raises:

NotImplementedError – must be implemented by the subclass.

abstract classmethod logcdf(*args, **kwargs) Tensor[source]

Computes the natural logarithm of the cumulative distribution function.

Returns:

log of the resulting cumulative probabilities.

Return type:

torch.Tensor

Raises:

NotImplementedError – must be implemented by the subclass.

abstract classmethod logpmf(*args, **kwargs) Tensor[source]

Computes the natural logarithm of the probability mass function.

Returns:

log of the resulting point probabilities.

Return type:

torch.Tensor

Raises:

NotImplementedError – must be implemented by the subclass.

abstract classmethod pmf(*args, **kwargs) Tensor[source]

Computes the probability mass function.

Returns:

resulting point probabilities.

Return type:

torch.Tensor

Raises:

NotImplementedError – must be implemented by the subclass.