pyhs3.distributions.MixtureDist

class pyhs3.distributions.MixtureDist(*, name, coefficients, extended, summands)[source]

Mixture of probability distributions.

Implements a weighted combination of multiple distributions:

\[f(x) = \sum_{i=1}^{n-1} c_i \cdot f_i(x) + (1 - \sum_{i=1}^{n-1} c_i) \cdot f_n(x)\]

The last component is automatically normalized to ensure the coefficients sum to 1.

Parameters:
  • coefficients (list[str]) – Names of coefficient parameters.

  • summands (list[str]) – Names of component distributions.

  • extended (bool) – Whether the mixture is extended (affects normalization).

  • name (str)

__init__(*, name, coefficients, extended, summands)[source]

Subclass of Distribution representing a mixture of distributions

Parameters:
  • name (str) – Name of the distribution.

  • coefficients (list) – Coefficient parameter names.

  • extended (bool) – Whether the distribution is extended.

  • summands (list) – List of component distribution names.

name

Name of the distribution.

Type:

str

coefficients

Coefficient parameter names.

Type:

list[str]

extended

Whether the distribution is extended.

Type:

bool

summands

List of component distribution names.

Type:

list[str]

parameters

List of coefficients and summands

Type:

list[str]

Methods

__init__(*, name, coefficients, extended, ...)

Subclass of Distribution representing a mixture of distributions

expression(distributionsandparameters)

Builds a symbolic expression for the mixture distribution.

from_dict(config)

Creates an instance of MixtureDist from a dictionary configuration.