Distribution
lerax.distribution.AbstractDistribution
Bases: eqx.Module
Base class for all distributions in Lerax.
log_prob
abstractmethod
Compute the log probability of a sample.
prob
abstractmethod
Compute the probability of a sample.
sample
abstractmethod
Return a sample from the distribution.
lerax.distribution.AbstractMaskableDistribution
Bases: AbstractDistribution[SampleType]
Base class for all maskable distributions in Lerax.
Maskable distributions allow masking of elements in the distribution.
Attributes:
| Name | Type | Description |
|---|---|---|
distribution |
The underlying distreqx distribution. |
mask
abstractmethod
Return a masked version of the distribution.
A masked distribution only considers the elements where the mask is True.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mask
|
MaskType
|
A mask indicating which elements to consider. |
required |
Returns:
| Type | Description |
|---|---|
Self
|
A new masked distribution. |
lerax.distribution.AbstractTransformedDistribution
Bases: AbstractDistreqxWrapper[SampleType]
Base class for all transformed distributions in Lerax.
Transformed distributions apply a bijective transformation to a base distribution.
Attributes:
| Name | Type | Description |
|---|---|---|
distribution |
eqx.AbstractVar[distributions.AbstractTransformed]
|
The underlying distreqx transformed distribution. |
bijector |
bijectors.AbstractBijector
|
The bijective transformation applied to the base distribution. |