Evaluations
fenbux.logpdf(dist: AbstractDistribution, x: ArrayLike) -> PyTree
Log probability density function
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dist |
AbstractDistribution |
Distribution object. |
required |
x |
ArrayLike |
Value to evaluate the logpdf at. |
required |
Examples:
>>> from fenbux import Normal, logpdf
>>> dist = Normal(0.0, 1.0)
>>> logpdf(dist, 0.0)
Array(-0.9189385, dtype=float32)
fenbux.pdf(dist: AbstractDistribution, x: ArrayLike) -> PyTree
Probability density function
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dist |
AbstractDistribution |
Distribution object. |
required |
x |
ArrayLike |
Value to evaluate the pdf at. |
required |
Examples:
>>> from fenbux import Normal, pdf
>>> dist = Normal(0.0, 1.0)
>>> pdf(dist, 0.0)
Array(0.3989423, dtype=float32)
fenbux.logcdf(dist: AbstractDistribution, x: ArrayLike) -> PyTree
Log cumulative distribution function
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dist |
AbstractDistribution |
Distribution object. |
required |
x |
ArrayLike |
Value to evaluate the logcdf at. |
required |
Examples:
>>> from fenbux import Normal
>>> dist = Normal(0.0, 1.0)
>>> logcdf(dist, 0.0)
Array(-0.6931472, dtype=float32)
fenbux.cdf(dist: AbstractDistribution, x: ArrayLike) -> PyTree
Cumulative distribution function
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dist |
AbstractDistribution |
Distribution object. |
required |
x |
ArrayLike |
Value to evaluate the cdf at. |
required |
Examples:
>>> from fenbux import Normal, cdf
>>> dist = Normal(0.0, 1.0)
>>> cdf(dist, 0.0)
Array(0.5, dtype=float32)
fenbux.quantile(dist: AbstractDistribution, p: ArrayLike) -> PyTree
Quantile function
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dist |
AbstractDistribution |
Distribution object. |
required |
p |
ArrayLike |
Value to evaluate the quantile at. |
required |
Examples:
>>> from fenbux import Normal
>>> n = Normal(0.0, 1.0)
>>> quantile(n, 0.5)
Array(0., dtype=float32)
fenbux.sf(dist: AbstractDistribution, x: ArrayLike) -> PyTree
Survival function of the distribution
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dist |
AbstractDistribution |
Distribution object. |
required |
x |
ArrayLike |
Value to evaluate the sf at. |
required |
Examples:
>>> from fenbux import Normal, sf
>>> dist = Normal(0.0, 1.0)
>>> sf(dist, 0.)
Array(0.5, dtype=float32)
fenbux.logsf(dist: AbstractDistribution, x: ArrayLike) -> PyTree
Log survival function
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dist |
AbstractDistribution |
Distribution object. |
required |
x |
ArrayLike |
Value to evaluate the logsf at. |
required |
Examples:
>>> from fenbux import Normal
>>> dist = Normal(0.0, 1.0)
>>> logsf(dist, 0.0)
Array(-0.6931472, dtype=float32)
fenbux.mgf(dist: AbstractDistribution, t: ArrayLike) -> PyTree
Moment generating function
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dist |
AbstractDistribution |
Distribution object. |
required |
t |
ArrayLike |
Value to evaluate the mgf at. |
required |
Examples:
>>> from fenbux import Normal, mgf
>>> dist = Normal(0.0, 1.0)
>>> mgf(dist, 0.5)
Array(1.1331484, dtype=float32)
fenbux.cf(dist: AbstractDistribution, t: ArrayLike) -> PyTree
Characteristic function
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dist |
AbstractDistribution |
Distribution object. |
required |
t |
ArrayLike |
Value to evaluate the cf at. |
required |
Examples:
>>> from fenbux import Normal, cf
>>> dist = Normal(0.0, 1.0)
>>> cf(dist, 0.5)
Array(0.8824969+0.j, dtype=complex64)