Skip to content

Statistics

fenbux.params(dist: AbstractDistribution) -> Tuple[PyTree, ...]

Extract parameters from a distribution

Parameters:

Name Type Description Default
dist AbstractDistribution

AbstractDistribution object.

required

Examples:

>>> from fenbux import Normal, params
>>> dist = Normal(0.0, 1.0)
>>> params(dist)
(Array(0., dtype=float32), Array(1., dtype=float32))

fenbux.support(dist: AbstractDistribution) -> Tuple[PyTree, PyTree]

Support of the distribution

Parameters:

Name Type Description Default
dist AbstractDistribution

Distribution object.

required

Examples:

>>> from fenbux import Normal, support
>>> dist = Normal(0.0, 1.0)
>>> support(dist)
(-inf, inf)

fenbux.mean(dist: AbstractDistribution) -> PyTree

Mean of the distribution

Parameters:

Name Type Description Default
dist AbstractDistribution

Distribution object.

required

Examples:

>>> from fenbux import Normal
>>> dist = Normal(0.0, 1.0)
>>> mean(dist)
Array(0., dtype=float32)

fenbux.variance(dist: AbstractDistribution) -> PyTree

Variance of the distribution

Parameters:

Name Type Description Default
dist AbstractDistribution

Distribution object.

required

Examples:

>>> from fenbux import Normal
>>> dist = Normal(0.0, 1.0)
>>> variance(dist)
Array(1., dtype=float32)

fenbux.standard_dev(dist: AbstractDistribution) -> PyTree

Standard deviation of the distribution

Parameters:

Name Type Description Default
dist AbstractDistribution

Distribution object.

required

Examples:

>>> from fenbux import Normal
>>> dist = Normal(0.0, 1.0)
>>> standard_dev(dist)
Array(1., dtype=float32)

fenbux.skewness(dist: AbstractDistribution) -> PyTree

Skewness of the distribution

Parameters:

Name Type Description Default
dist AbstractDistribution

Distribution object.

required

Examples:

>>> from fenbux import Normal, skewness
>>> dist = Normal(0.0, 1.0)
>>> skewness(dist)
Array(0., dtype=float32)

fenbux.kurtosis(dist: AbstractDistribution) -> PyTree

Kurtosis of the distribution

Parameters:

Name Type Description Default
dist AbstractDistribution

Distribution object.

required

Examples:

>>> from fenbux import Normal, kurtosis
>>> dist = Normal(0.0, 1.0)
>>> kurtois(dist)
Array(0., dtype=float32)

fenbux.entropy(dist: AbstractDistribution) -> PyTree

Entropy of the distribution

Parameters:

Name Type Description Default
dist AbstractDistribution

Distribution object.

required

Examples:

>>> from fenbux import Normal, entropy
>>> dist = Normal(0.0, 1.0)
>>> entropy(dist)
Array(1.4189385, dtype=float32)