spux.distributions package

Submodules

spux.distributions.distribution module

class spux.distributions.distribution.Distribution[source]

Bases: object

draw(rng)[source]

Draw a random vector using the provided random state ‘rng’.

intervals(alpha=0.99)[source]

Return intervals for the specified centered probability mass.

Intervals are returned for each parameter.

logmpdf(label, parameter)[source]

Return marginal log-PDF for the specified parameter.

logpdf(parameters)[source]

Base method to be overloaded to evaluate the logarithm of the (joint) prob. distr. function of parameters.

‘parameters’ are assumed to be of a pandas.DataFrame type

mpdf(label, parameter)[source]

Return marginal PDF for the specified parameter.

pdf(parameters)[source]

Base method to be overloaded to evaluate the (joint) prob. distr. function of parameters.

‘parameters’ are assumed to be of a pandas.DataFrame type

spux.distributions.multivariate module

class spux.distributions.multivariate.Multivariate(distribution, labels, marginals=None)[source]

Bases: spux.distributions.distribution.Distribution

draw(rng)[source]

Draw a random vector using the provided random state ‘rng’.

intervals(alpha=0.99)[source]

Return intervals for the specified centered probability mass.

logmpdf(label, parameter)[source]

Return marginal log-PDF for the specified parameter.

logpdf(parameters)[source]

Evaluate the logarithm of the (joint) prob. distr. function of (covariate) parameters.

‘parameters’ are assumed to be of a pandas.DataFrame type

mpdf(label, parameter)[source]

Return marginal PDF for the specified parameter.

pdf(parameters)[source]

Evaluate the (joint) prob. distr. function of (covariate) parameters.

‘parameters’ are assumed to be of a pandas.DataFrame type

spux.distributions.tensor module

class spux.distributions.tensor.Tensor(distributions, types_of_keys=None)[source]

Bases: spux.distributions.distribution.Distribution

draw(rng)[source]

Draw a random vector using the provided random state ‘rng’.

intervals(alpha=0.99)[source]

Return intervals for the specified centered probability mass.

logmpdf(label, parameter)[source]

Return marginal log-PDF for the specified parameter.

logpdf(parameters)[source]

Evaluate the logarithm of the (joint) prob. distr. function of the tensorized, i.e. assuming independence, random variables ‘parameters’.

‘parameters’ are assumed to be of a pandas.Series type

mpdf(label, parameter)[source]

Return marginal PDF for the specified parameter.

pdf(parameters)[source]

Evaluate the (joint) prob. distr. function of the tensorized, i.e. assuming independence, random variables ‘parameters’.

‘parameters’ are assumed to be of a pandas.Series type