Module: distributions

Nodes for interacting with probability distributions.

These nodes can be used to create various kinds of common probability distributions and compute their quantities such as mean, variance, or entropy of the distribution, the log-probability of given data point(s), or draw samples from the distribution.

Similarly to the array creation nodes, these nodes likewise allow the user to optionally choose one of several backend implementations of otherwise mathematically equivalent distributions. This is taken care of automatically when using the nodes in a context such as bayesian inference. Outside these contexts, the default backend (numpy/scipy) is fine for most scientific computing, but when used with the (gradient-)based methods in the optimization category, one of the jax-based backends may have to be chosen.

BernoulliDistribution

Specify a Bernoulli distribution given a probability of a success.

This is the canonical distribution for binary outcomes, for example in a GLM (when the linear model is wired into probs and is_logits is chosen). Defined on the integers 0 and 1 representing failure and success, respectively, the parameter p is the probability of a success. The parameter p can also be specified as the log of the odds p/(1-p), or equivalently log p - log (1-p), aka logits. The Bernoulli distribution is a special case of the Binomial distribution for a total count of draws (n) of 1. Other generalizations are the categorical distribution for more than two outcomes, and the beta-binomial distribution for when the probability of success is drawn from a Beta distribution with some parameters.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • probs
    Probability of a success.

    • verbose name: Success Probability (P)
    • default value: 0.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • is_logits
    Whether the parameter is specified as logits, i.e ., log p/(1-p) instead of p aka the log-odds.

    • verbose name: Is Logits
    • default value: logits
    • port type: EnumPort
    • value type: str (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

BetaBinomialDistribution

Specify a Beta-Binomial distribution with a total count n and shape parameters alpha, beta.

Like the Binomial distribution, this models the distribution of the number of successes in n independent Bernoulli trials, on the integer interval 0 through n, but the probability of success is not fixed but drawn from a Beta distribution with parameters alpha and beta. This allows the distribution to model overdispersion in the number of successes (i.e., heavier tails than the Binomial distribution) due to unobserved heterogeneity in the success probabilities.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • total_count
    Total number of Bernoulli trials.

    • verbose name: Number Of Trials (N)
    • default value: 1
    • port type: Port
    • value type: AnyNumeric (can be None)
  • concentration1
    Alpha shape parameter of the distribution.

    • verbose name: Concentration 1 (Alpha)
    • default value: None
    • port type: Port
    • value type: AnyNumeric (can be None)
  • concentration0
    Beta shape parameter of the distribution.

    • verbose name: Concentration 0 (Beta)
    • default value: None
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

BetaDistribution

Specify a Beta distribution with shape parameters alpha and beta.

This is the conjugate prior for the Bernoulli distribution and can therefore be used as a prior for the probability of success in a Bernoulli trial.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • concentration1
    Alpha shape parameter of the distribution.

    • verbose name: Concentration 1 (Alpha)
    • default value: None
    • port type: Port
    • value type: AnyNumeric (can be None)
  • concentration0
    Beta shape parameter of the distribution.

    • verbose name: Concentration 0 (Beta)
    • default value: None
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

BinomialDistribution

Specify a Binomial distribution given a total number of trials n and probability of a success p.

This is a canonical distribution for modeling number of events in a fixed number of trials with a fixed probability of "success" in each trial. This models the distribution of the number of successes in n independent Bernoulli trials, on the integer interval 0 through n. The parameter p can also be specified as the log of the odds p/(1-p), or equivalently log p - log (1-p), aka logits. A special case for n=1 is the Bernoulli distribution. Also, a limiting case for large n or small p is given by the Poisson distribution.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • total_count
    Total Number of Bernoulli trials.

    • verbose name: Number Of Trials (N)
    • default value: 1
    • port type: Port
    • value type: AnyNumeric (can be None)
  • probs
    Probability of a success.

    • verbose name: Success Probability (P)
    • default value: 0.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • is_logits
    Whether the parameter is specified as logits, i.e ., log p/(1-p) instead of p aka the log-odds.

    • verbose name: Is Logits
    • default value: logits
    • port type: EnumPort
    • value type: str (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

CategoricalDistribution

Specify a categorical distribution given the probability p_i of each of k possible discrete outcomes.

This is a generalization of the Bernoulli distribution to more than two outcomes, and is a canonical distribution for modeling multi-class outcomes. The parameters p can also be specified as the log of the odds p/(1-p), or equivalently log p - log (1-p), aka logits. The output is integers between 0 and k-1 by default, or one-hot vectors (all zeros except for a single 1 in the k'th position) if the one_hot flag is set to True. This is also a special case of the multinomial distribution for a total count of draws (n) of 1.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • probs
    Probability of each of k different outcomes.

    • verbose name: Outcome Probabilities (P)
    • default value: [0.0, 0.0]
    • port type: Port
    • value type: AnyNumeric (can be None)
  • is_logits
    Whether the parameter is specified as logits, i.e ., log p/(1-p) instead of p aka the log-odds.

    • verbose name: Is Logits
    • default value: logits
    • port type: EnumPort
    • value type: str (can be None)
  • one_hot
    Whether to return one-hot vectors instead of integers.

    • verbose name: One Hot
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

CauchyDistribution

Specify a Cauchy distribution with a given location x0 and scale lambda.

A cauchy distribution is an extremely heavy-tailed distribution, with undefined mean and variance due to the respective integrals diverging.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • loc
    Location parameter.

    • verbose name: Location (X0)
    • default value: 0.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • scale
    Scale parameter.

    • verbose name: Scale (Gamma)
    • default value: 1.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

Chi2Distribution

Specify a Chi-squared distribution with given degrees of freedom k.

The distribution of the sum of squares of k independent standard normal random variables. Used in hypothesis testing and confidence intervals for the variance of a normal distribution.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • df
    Degrees of freedom parameter.

    • verbose name: Degrees Of Freedom (K)
    • default value: 1
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

DirichletDistribution

Specify a Dirichlet distribution with a vector of given concentrations alpha.

This is a multivariate generalization of the beta distribution that can be used as a conjugate prior for the success probability in categorical and multinomial distributions.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • concentration
    Concentration / shape parameter.

    • verbose name: Concentrations (Alpha)
    • default value: [2.0, 2.0, 2.0]
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

DirichletMultinomialDistribution

Specify a Dirichlet-Multinomial distribution with a given total count n and concentrations alpha.

This is a generalization of the Beta-Binomial distribution to more than 2 outcomes, and like the Multinomial distribution it models the probability of observing a particular combination of counts of each of k different outcomes across n multinomial trials (see Multinomial distribution for more details). However, unlike the Multinomial, the probabilities of each of the possible outcomes are not fixed but themselves drawn from a dirichlet distribution with a given vector of concentrations; this can be used to model overdispersed outcomes (variance larger than expected from a multinomial distribution with a given set success probabilities) due to unobserved heterogeneity in the success probabilities.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • total_count
    Number of trials.

    • verbose name: Number Of Trials (N)
    • default value: 1
    • port type: Port
    • value type: AnyNumeric (can be None)
  • concentration
    Concentration / shape parameter.

    • verbose name: Concentrations (Alpha)
    • default value: [2.0, 2.0, 2.0]
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

DistributionCDF

Calculate the cumulative distribution function (CDF) of a provided (wired-in) probability distribution at the given point(s) in the event space.

For univariate distributions, this quantifies the probability that a value drawn from the distribution will be less than the given cutoff, or equivalently, the distribution's probability mass that lies to the left of the given "cutoff" value. For multivariate distributions, the cutoff is itself multivariate, and the result is the probability mass in the section of the event space where all axes are less than the corresponding value at that axis. The CDF is not implemented for all combinations of distributions and backends, and if not, you may opt to use the scipy backend to have the greatest chance of success. This is generally a scalar, but the value will be an array if the distribution itself is batched, as in, is parameterized by a batch of parameters (e.g., multiple sets of locations or scales) and/or if the given value is itself a batch. In these cases, the shape of the result is (sample_shape, batch_shape) where sample_shape is the shape of value without the last n dimension(s), if the distribution is multivariate (n=1) or matrix-variate (n=2). For the distributions defined in the distributions package, the CDF is generally the analytic, i.e. exact, result, but for sampling-based distributions (e.g., those output by one of the Inference nodes), this will be an approximation. For distributions defined over multiple named random variables (e.g., posterior distributions), the result will be of the same format as the value, i.e., either a Packet or a dictionary of arrays.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    Distribution to use.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: IN
  • value
    Cutoff value at which to evaluate the CDF, and result.

    • verbose name: Value
    • default value: None
    • port type: DataPort
    • value type: object (can be None)
    • data direction: INOUT
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • axis_pairing
    How to pair axes of the distribution and the operand. In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

DistributionEntropy

Calculate the entropy of a provided (wired-in) probability distribution.

This is generally a scalar, but the value will be an array if the distribution itself is batched, as in, is parameterized by a batch of parameters (e.g., multiple sets of locations or scales). In these cases, the shape of the result is (batch_shape). Note that the entropy is not available if your you have chosen numpyro as the backend for your distribution, but when available, it is the analytic, i.e. exact, result. Entropy is also not readily available for sampling-based distributions (e.g., those obtained from one of the Inference nodes).

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    Distribution to use.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: IN
  • value
    Resulting value.

    • verbose name: Value
    • default value: None
    • port type: DataPort
    • value type: AnyNumeric (can be None)
    • data direction: OUT
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)

DistributionHighestDensityInterval

Calculate the highest probability density interval (HPDI) of a provided (wired-in) probability distribution.

This returns a pair of values -- a lower and upper bound. For univariate distributions, each of these is a scalar, but the value will be an array if the distribution's event space is multivariate, and/or if the distribution itself is batched, as in, is parameterized by a batch of parameters (e.g., multiple sets of locations or scales). In these cases, the shape of the result is (batch_shape, event_shape). For the distributions defined in the distributions package, this yields generally the analytic, i.e. exact, result, but the measure is defined in terms of the icdf and is only available for combinations of distributions and backends that have an icdf defined (your best bets are scipy (all distributions), numpyro (most), and torch (a few)). For sampling-based distributions (e.g., those obtained from one of the Inference nodes), this will generally be an approximation. For distributions defined over multiple named random variables (e.g., posterior distributions), the result will be a Packet whose chunks are named after the random variables.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    Distribution to use.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: IN
  • lower
    Lower bound (less than median).

    • verbose name: Lower
    • default value: None
    • port type: DataPort
    • value type: object (can be None)
    • data direction: OUT
  • upper
    Upper bound (greater than median).

    • verbose name: Upper
    • default value: None
    • port type: DataPort
    • value type: object (can be None)
    • data direction: OUT
  • probability
    Probability of values lying in interval. The resulting range will be such that values fall into the range with this probability. For (approximately) symmetric distributions, this will be a central interval, i.e. the probability of values falling below the lower bound will be 1-probability/2, and the probability of values falling above the upper bound will be 1-probability/2.

    • verbose name: Probability
    • default value: 0.9
    • port type: FloatPort
    • value type: float (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • axis_pairing
    How to pair axes of the distribution and the operand. In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

DistributionICDF

Calculate the inverse cumulative distribution function (iCDF) of a provided (wired-in) probability distribution at the given quantile(s).

This returns the point in event space such that the given quantile of the distribution's probability mass is lower than the provided quantile value. Among distributions specified in the distributions package, this is only defined for univariate distributions, and is further only available if your distribution uses the scipy or numpyro backends internally (although torch supports it for a subset of distributions). For the distributions defined in the distributions package, the ICDF is generally the analytic, i.e. exact, result, but for sampling-based distributions (e.g., those output by one of the Inference nodes), this will be an approximation. For distributions defined over multiple named random variables (e.g., posterior distributions), the result will be of the same format as the value, i.e., either a Packet or a dictionary of arrays. In the case of sampling-based distributions, the iCDF is also defined in the multivariate case, where the same quantile is evaluated independently for each axis. For univariate distributions, this is a scalar, but the value will be an array if the distribution's event space is multivariate, and/or if the distribution itself is batched, as in, is parameterized by a batch of parameters (e.g., multiple sets of locations or scales) and/or if the given value is itself a batch. In all these cases, the shape of the result is (sample_shape, batch_shape, event_shape) where sample_shape is the shape of the value (note one cannot specify a different quantile for each dimension of the event space, so any dimension in the value is treated as a batch dimension).

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    Distribution to use.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: IN
  • value
    Value at which to evaluate the CDF, and result.

    • verbose name: Value
    • default value: None
    • port type: DataPort
    • value type: object (can be None)
    • data direction: INOUT
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)

DistributionInterquartileRange

Calculate the interquartile range (difference of 75th and 25th percentile of a provided (wired-in) probability distribution.

For univariate distributions, this is a scalar, but the value will be an array if the distribution's event space is multivariate, and/or if the distribution itself is batched, as in, is parameterized by a batch of parameters (e.g., multiple sets of locations or scales). In these cases, the shape of the result is (batch_shape, event_shape). For the distributions defined in the distributions package, this yields generally the analytic, i.e. exact, result, but the measure is defined in terms of the icdf and is only available for combinations of distributions and backends that have an icdf defined (your best bets are scipy (all distributions), numpyro (most), and torch (a few)). For sampling-based distributions (e.g., those obtained from one of the Inference nodes), this will generally be an approximation. For distributions defined over multiple named random variables (e.g., posterior distributions), the result will be a Packet whose chunks are named after the random variables.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    Distribution to use.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: IN
  • value
    Resulting value.

    • verbose name: Value
    • default value: None
    • port type: DataPort
    • value type: object (can be None)
    • data direction: OUT
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)

DistributionMean

Calculate the mean (expected value) of a provided (wired-in) probability distribution.

For univariate distributions, this is a scalar, but the value will be an array if the distribution's event space is multivariate, and/or if the distribution itself is batched, as in, is parameterized by a batch of parameters (e.g., multiple sets of locations or scales). In these cases, the shape of the result is (batch_shape, event_shape). For the distributions defined in the distributions package, this yields generally the analytic, i.e. exact, result, but for sampling-based distributions (e.g., those obtained from one of the Inference nodes), this will be an approximation. For distributions defined over multiple named random variables (e.g., posterior distributions), the result will be a Packet whose chunks are named after the random variables. One may wire in a template array to specify the data type and/or precision of the result.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    Distribution to use.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: IN
  • value
    Resulting value.

    • verbose name: Value
    • default value: None
    • port type: DataPort
    • value type: object (can be None)
    • data direction: OUT
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)

DistributionMedian

Calculate the median (robust location) of a provided (wired-in) probability distribution.

For univariate distributions, this is a scalar, but the value will be an array if the distribution's event space is multivariate, and/or if the distribution itself is batched, as in, is parameterized by a batch of parameters (e.g., multiple sets of locations or scales). In these cases, the shape of the result is (batch_shape, event_shape). For the distributions defined in the distributions package, this yields generally the analytic, i.e. exact, result, but the median is defined in terms of the icdf and is only available for combinations of distributions and backends that have an icdf defined (your best bets are scipy (all distributions), numpyro (most), and torch (a few)). For sampling-based distributions (e.g., those obtained from one of the Inference nodes), this will generally be an approximation. For distributions defined over multiple named random variables (e.g., posterior distributions), the result will be a Packet whose chunks are named after the random variables.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    Distribution to use.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: IN
  • value
    Resulting value.

    • verbose name: Value
    • default value: None
    • port type: DataPort
    • value type: object (can be None)
    • data direction: OUT
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)

DistributionMedianAbsoluteDeviation

Calculate the median absolute deviation (the median of absolute differences from the distribution's median) of a provided (wired-in) probability distribution.

For univariate distributions, this is a scalar, but the value will be an array if the distribution's event space is multivariate, and/or if the distribution itself is batched, as in, is parameterized by a batch of parameters (e.g., multiple sets of locations or scales). In these cases, the shape of the result is (batch_shape, event_shape). For the distributions defined in the distributions package, this yields generally the analytic, i.e. exact, result, but the measure as implemented here is only defined for symmetric distributions and is only available for combinations of distributions and backends that have an icdf defined (your best bets are scipy (all distributions), numpyro (most), and torch (a few)). For sampling-based distributions (e.g., those obtained from one of the Inference nodes), this will generally be an approximation. For distributions defined over multiple named random variables (e.g., posterior distributions), the result will be a Packet whose chunks are named after the random variables.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    Distribution to use.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: IN
  • value
    Resulting value.

    • verbose name: Value
    • default value: None
    • port type: DataPort
    • value type: object (can be None)
    • data direction: OUT
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)

DistributionMode

Calculate the mthe mode (location of maximum value) of a provided (wired-in) probability distribution.

For univariate distributions, this is a scalar, but the value will be an array if the distribution's event space is multivariate, and/or if the distribution itself is batched, as in, is parameterized by a batch of parameters (e.g., multiple sets of locations or scales). In these cases, the shape of the result is (batch_shape, event_shape). For the distributions defined in the distributions package, this yields generally the analytic, i.e. exact, result, but is not available for all combinations of distributions and backends (good choices are scipy, tfp, or distrax, if your distribution is available for those backends). The mode is usually not directly available for sampling-based distributions (e.g., those output by one of the Inference nodes), but the mode of such a distribution can be obtained from the Variational Inference node if the approximation is set to MAP (maximum a posteriori) or Laplace.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    Distribution to use.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: IN
  • value
    Resulting value.

    • verbose name: Value
    • default value: None
    • port type: DataPort
    • value type: object (can be None)
    • data direction: OUT
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)

DistributionPDF

Calculate the probability density of a wired-in probability distribution at the given point(s) in event space, by default in log space (i.e

., log probability) for numerical stability. This is referred to as either the probability density function (PDF) if the distribution is continuous, or probability mass function (PMF) if the distribution is discrete. In either case, this is the analytic, i.e. exact, result. This is generally a scalar, but the value will be an array if if the distribution itself is batched, as in, is parameterized by a batch of parameters (e.g., multiple sets of locations or scales) and/or if the given value is itself a batch. In these cases, the shape of the result is (sample_shape, batch_shape) where sample_shape is the shape of the value without the last n dimension(s) if the distribution is multivariate (n=1) or matrix-variate (n=2). Note that the PDF is typically not readily available for sampling-based distributions (e.g., those output by one of the Inference nodes).

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    Distribution to use.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: IN
  • value
    Value at which to evaluate the PDF, and result.

    • verbose name: Value
    • default value: None
    • port type: DataPort
    • value type: AnyNumeric (can be None)
    • data direction: INOUT
  • log_space
    Return the log probability, otherwise the probability itself. The log is numerically better behaved for small values.

    • verbose name: Log Space
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)

DistributionProperty

Get a specified property of the given distribution.

The available properties include the event and batch shape, whether the distribution is discrete or symmetric, and whether the distribution is fully reparameterized. See option parameter for more details.

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    Distribution to use.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: IN
  • value
    Resulting value.

    • verbose name: Value
    • default value: None
    • port type: DataPort
    • value type: object (can be None)
    • data direction: OUT
  • option
    The property to look up. The available properties are as follows: event_shape is a list of dimensions of the event space of the distribution (if the distribution is multivariate, otherwise []), batch_shape is a list of dimensions of the batch of distributions (if the distribution is a batch of distributions with different parameters, otherwise []), is_discrete is True if the distribution is discrete, shape is the full shape of the distribution (batch_shape + event_shape), and is_reparameterized is True if the distribution is reparameterized, meaning that gradients of a draw from the distribution with respect to the distribution's parameters are well-defined and can be computed.

    • verbose name: Option
    • default value: event_shape
    • port type: EnumPort
    • value type: str (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)

DistributionStandardDeviation

Calculate the standard deviation of a provided (wired-in) probability distribution.

For univariate distributions, this is a scalar, but the value will be an array if the distribution's event space is multivariate, and/or if the distribution itself is batched, as in, is parameterized by a batch of parameters (e.g., multiple sets of locations or scales). In these cases, the shape of the result is (batch_shape, event_shape). For the distributions defined in the distributions package, this yields generally the analytic, i.e. exact, result, but for sampling-based distributions (e.g., those output by one of the Inference nodes), this will be an approximation. For distributions defined over multiple named random variables (e.g., posterior distributions), the result will be a Packet with chunks named after the random variables, and the blocks containing the respective array.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    Distribution to use.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: IN
  • value
    Resulting value.

    • verbose name: Value
    • default value: None
    • port type: DataPort
    • value type: object (can be None)
    • data direction: OUT
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)

DistributionVariance

Calculate the variance (expected value) of a provided (wired-in) probability distribution.

For univariate distributions, this is a scalar, but the value will be an array if the distribution's event space is multivariate, and/or if the distribution itself is batched, as in, is parameterized by a batch of parameters (e.g., multiple sets of locations or scales). In these cases, the shape of the result is (batch_shape, event_shape). For the distributions defined in the distributions package, this yields generally the analytic, i.e. exact, result, but for sampling-based distributions (e.g., those output by one of the Inference nodes), this will be an approximation. For distributions defined over multiple named random variables (e.g., posterior distributions), the result will be a Packet with chunks named after the random variables, and the blocks containing the respective array.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    Distribution to use.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: IN
  • value
    Resulting value.

    • verbose name: Value
    • default value: None
    • port type: DataPort
    • value type: object (can be None)
    • data direction: OUT
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)

ExponentialDistribution

Specify a Exponential distribution with given rate parameter lambda.

Note this is differs from the parameterization using a scale parameter, where rate and scale are reciprocals of each other. Along with the half-normal distribution, this can be used as a prior for scale/variance parameters of distributions due to its non-negativity and unbounded support.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • rate
    Rate parameter.

    • verbose name: Rate (Lambda)
    • default value: 1.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

GammaDistribution

Specify a Gamma distribution with a given concentration alpha and rate beta.

Note that this is the alpha/beta parameterization and not the shape/scale (k/theta) parameterization. Used as a conjugate prior for various kinds of invere scale (rate) parameters of distributions.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • concentration
    Concentration / shape parameter.

    • verbose name: Concentration (Alpha)
    • default value: None
    • port type: Port
    • value type: AnyNumeric (can be None)
  • rate
    Rate (inverse scale) parameter.

    • verbose name: Rate (Beta)
    • default value: 1.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

GeneralizedExtremeValueDistribution

Specify a Generalized Extreme Value distribution with a given location mu, scale sigma, and (signed) shape parameter zeta.

This distribution models the maximum of a series of normalized independent random variables and can be applied to model data with heavy tails/large outliers. Positive values for zeta tend to be right-skewed (peak on right), and negative values are left-skewed. Note that some sources use the convention of using the opposite sign for zeta; this implementation follows the Wikipedia convention.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • loc
    Location parameter.

    • verbose name: Location (Mu)
    • default value: 0.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • scale
    Scale parameter.

    • verbose name: Scale (Sigma)
    • default value: 1.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • concentration
    Shape parameter. Can be positive or negative.

    • verbose name: Concentration (Zeta)
    • default value: 2.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

GeneralizedNormalDistribution

Specify a Generalized Normal distribution with a given location mu, scale sigma, and shape parameter beta.

This is a symmetric distribution that can interpolate between the Normal (beta=2) and Laplace (beta=1) distributions, and also extrapolate to more extreme super- and sub-Gaussian distributions depending on the beta parameter. There is also an asymmetric form, which is not implemented here. This distribution is also the Bayesian prior distribution corresponding to the l_p quasi-norm methods in sparse modeling, where p is beta.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • loc
    Location parameter.

    • verbose name: Location (Mu)
    • default value: 0.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • scale
    Scale parameter.

    • verbose name: Scale (Sigma)
    • default value: 1.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • power
    Shape (power) parameter.

    • verbose name: Power (Beta)
    • default value: 2.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

GeneralizedParetoDistribution

Specify a Generalized Pareto distribution with a given location mu, scale sigma, and shape parameter zeta.

This distribution is sometimes used to model the tails of other distributions.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • loc
    Location parameter.

    • verbose name: Location (Mu)
    • default value: 0.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • scale
    Scale parameter.

    • verbose name: Scale (Sigma)
    • default value: 1.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • concentration
    Shape parameter.

    • verbose name: Concentration (Zeta)
    • default value: 2.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

GeometricDistribution

Specify a Geometric distribution given a probability of a success p.

The distribution quantifies the number of "failures" before the first success outcome in a series of Bernoulli trials and is defined on the integers {0, 1, 2, ..., inf}. Note that in some conventions, the number of trials until the first success is returned, which is the same distribution but with outcomes shifted by +1 (support not including 0). The parameter p can also be specified as the log of the odds p/(1-p), or equivalently log p - log (1-p), aka logits.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • probs
    Probability of a success.

    • verbose name: Siccess Probability (P)
    • default value: 0.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • is_logits
    Whether the parameter is specified as logits, i.e ., log p/(1-p) instead of p aka the log-odds.

    • verbose name: Is Logits
    • default value: logits
    • port type: EnumPort
    • value type: str (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

GumbelDistribution

Specify a Gumbel distribution with a given location mu and scale beta.

This is a type of (heavy-tailed) extreme value distribution and special case of the GEV distribution that models the maximum of a series of normalized random variables. Another application is in models where the errors of a multinomial logit distribution are assumed to be Gumbel distributed. This is the right-skewed (conventional) version of the distribution.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • loc
    Location parameter.

    • verbose name: Location (Mu)
    • default value: 0.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • scale
    Scale parameter.

    • verbose name: Scale (Beta)
    • default value: 1.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

HalfCauchyDistribution

Specify a half-Cauchy distribution with a given scale gamma.

This is a heavy-tailed distribution that represents the right half of a Cauchy distribution (appropriately rescaled).

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • scale
    Scale parameter.

    • verbose name: Scale (Gamma)
    • default value: 1.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

HalfNormalDistribution

Specify a half-normal distribution with a given scale sigma.

This is the right half of a centered normal distribution. Along with the exponential distribution, the half-normal is frequently used as a prior for scale parameters of distributions due to its non-negativity.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • scale
    Scale parameter.

    • verbose name: Scale (Sigma)
    • default value: 1.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

InverseGammaDistribution

Specify a Inverse-Gamma distribution with a given concentration alpha and rate beta.

Note that this is the concentration/rate parameterization and not the shape/scale (k/theta) parameterization. A main use case is as an (informative) conjugate prior for the variance of a Normal distribution, or as as the (marginal) posterior distribution of the variance of a Normal distribution (when an uninformative prior is used).

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • concentration
    Concentration / shape parameter.

    • verbose name: Concentration (Alpha)
    • default value: None
    • port type: Port
    • value type: AnyNumeric (can be None)
  • rate
    Rate parameter.

    • verbose name: Rate (Beta)
    • default value: 1.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

KumaraswamyDistribution

Specify a Kumaraswamy distribution with shape parameters alpha and beta.

The Kumaraswamy distribution is similar in shape to the Beta distribution and can be used as a substitute, but is easier to reparameterize, and thus more suitable for some forms of Bayesian inference (e.g., variational inference).

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • concentration1
    Alpha shape parameter of the distribution.

    • verbose name: Concentration 1 (Alpha)
    • default value: None
    • port type: Port
    • value type: AnyNumeric (can be None)
  • concentration0
    Kumaraswamy shape parameter of the distribution.

    • verbose name: Concentration 0 (Beta)
    • default value: None
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

LKJDistribution

Specify an LKJ (Lewandowski-Kurowicka-Joe) distribution of correlation matrices parameterized by dimensionality dim and a concentration η, where matrices are of shape (dim x dim).

The LKJ is a commonly used distribution in multivariate Bayesian statistics to model priors over correlation matrices or other positive definite symmetric matrices that have unit diagonals. The cholesky factor option outputs not the matrix itself but its (lower) triangular Cholesky factor, which is recommended due to the better numerical stability.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • dim
    Dimension of the generated matrices. Can also be wired in as an axis.

    • verbose name: Dimensionality (D)
    • default value: 3
    • port type: Port
    • value type: object (can be None)
  • concentration
    Concentration / shape parameter. Seetting this to < 1 amounts to a prior assumption of strong correlation (or anti-correlation), 1 yields a uniform distribution over correlation matrices (meaning that there is no preference over high or low correlation), and > 1 amounts to a prior assumption of weak correlation.

    • verbose name: Concentration (Eta)
    • default value: 1.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • output_cholesky
    Output the Cholesky factor of the correlation matrix instead of the matrix itself.

    • verbose name: Output Cholesky Factor
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

LaplaceDistribution

Specify a Laplace distribution with a given location mu and scale b.

The Laplace distribution is a symmetric heav-tailed distribution that occurs as the prior in convex sparse estimation problems since it is the most heavy-tailed distribution whose negative logarithm is convex.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • loc
    Location parameter.

    • verbose name: Location (Mu)
    • default value: 0.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • scale
    Scale parameter.

    • verbose name: Scale (B)
    • default value: 1.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

LogNormalDistribution

Specify a Log-Normal distribution with a given location mu and scale sigma.

This occurs as the distribution of a product of many random variables that are all positive, or of a log-transformed normally-distributed random variable. Note that the location/scale parameters are for the distribution before the log-transform, so the mean does not equal the location parameter.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • loc
    Location parameter.

    • verbose name: Location (Mu)
    • default value: 0.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • scale
    Scale parameter.

    • verbose name: Scale (Sigma)
    • default value: 1.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

LogisticDistribution

Specify a Logistic distribution with a given location mu and scale s.

One use of this distribution is in a Bayesian latent-variable formulation of logistic regression, where the error terms are assumed to be Logistic distributed.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • loc
    Location parameter.

    • verbose name: Location (Mu)
    • default value: 0.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • scale
    Scale parameter.

    • verbose name: Scale (S)
    • default value: 1.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

MultinomialDistribution

Specify a Multinomial distribution given a total number of trials n and the probabilities alpha_i of k different possible outcomes in each trial.

This is a multivariate generalization of the binomial distribution and is defined on a vector of k integer-valued dimensions to which it assigns a probability. Any such vector represents a combination of the counts of each of the given outcomes across the total number of trials, and the multinomial assigns a probability of observing each combination. The parameter p can also be specified as the log of the odds p/(1-p), or equivalently log p - log (1-p), aka logits. A special case for n=1 is the categorical distribution. A generalization for overdispersed multinomial coutcomes is the Dirichlet-multinomial distribution.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • total_count
    Number of trials.

    • verbose name: Number Of Trials (N)
    • default value: 1
    • port type: Port
    • value type: AnyNumeric (can be None)
  • probs
    Probability of each of k different outcomes.

    • verbose name: Outcome Probabilities (Alpha)
    • default value: [0.0, 0.0]
    • port type: Port
    • value type: AnyNumeric (can be None)
  • is_logits
    Whether the parameter is specified as logits, i.e ., log p/(1-p) instead of p aka the log-odds.

    • verbose name: Is Logits
    • default value: logits
    • port type: EnumPort
    • value type: str (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

MultivariateNormalDistribution

Specify a multivariate normal distribution.

The scale parameter can be specified either as a covariance matrix, a precision matrix (inverse covariance matrix), or a lower triangular matrix (cholesky factor) of the covariance matrix. Alternatively, the scale can be specified as a vector of standard deviations, which, when squared, will form the diagonal of the covariance matrix. One may also specify both the cholesky factor and the scale vector, in which case the cholesky factor will be pre-scaled by the vector. Note that most backends will handle the scale_diag or scale_tril representations with better numeric stability and computational cost than the cov or prec representations.

More Info...

Version 0.9.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • loc
    Location vector.

    • verbose name: Location Vector (Mu)
    • default value: 0.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • cov
    Covariance matrix.

    • verbose name: Covariance Matrix (Sigma)
    • default value: None
    • port type: Port
    • value type: AnyNumeric (can be None)
  • prec
    Precision matrix.

    • verbose name: Precision Matrix (Sigma^-1)
    • default value: None
    • port type: Port
    • value type: AnyNumeric (can be None)
  • scale_tril
    Lower triangular matrix (cholesky factor) of covariance matrix.

    • verbose name: Cov Cholesky Factor (L)
    • default value: None
    • port type: Port
    • value type: AnyNumeric (can be None)
  • scale_diag
    Diagonal scale vector

    • verbose name: Diagonal Scale Vector (S)
    • default value: None
    • port type: Port
    • value type: AnyNumeric (can be None)
  • sanity_checks
    How to handle sanity checks for the input parameters. If set to 'error', the node will raise an error if the input parameters are not consistent. If set to 'warn' (respectively 'warn-once'), the node will issue a (one-time) warning. If set to 'off', the node will perform only minimal sanity checks.

    • verbose name: Sanity Checks
    • default value: error
    • port type: EnumPort
    • value type: str (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

MultivariateStudentTDistribution

Specify a multi-variate Student-t distribution, parameterized by degrees of freedom nu, a location vector mu, and a lower-triangular scale matrix L.

The scale parameter can be obtained, for example, as a cholesky factor of a covariance matrix.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • df
    Degrees of freedom.

    • verbose name: Degrees Of Freedom (Nu)
    • default value: 1
    • port type: FloatPort
    • value type: float (can be None)
  • loc
    Location vector.

    • verbose name: Location Vector (Mu)
    • default value: 0.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • scale_tril
    Lower triangular scale matrix.

    • verbose name: Scale Matrix (L)
    • default value: [[1.0]]
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

NegativeBinomialDistribution

Specify a negative Binomial distribution given a total number of trials n and probability of a success p.

Note that this variant is parameterized by the number of total trials, which is one of the several conventions named "negative Binomial". The parameter p can also be specified as the log of the odds p/(1-p), or equivalently log p - log (1-p), aka logits.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • total_count
    Number of trials.

    • verbose name: Total Number Of Trials (N)
    • default value: 1
    • port type: Port
    • value type: AnyNumeric (can be None)
  • probs
    Probability of a success.

    • verbose name: Success Probability (P)
    • default value: 0.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • is_logits
    Whether the parameter is specified as logits, i.e ., log p/(1-p) instead of p aka the log-odds.

    • verbose name: Is Logits
    • default value: logits
    • port type: EnumPort
    • value type: str (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

NormalDistribution

Specify a normal (aka Gaussian) distribution with a given location mu and scale sigma.

This is the most common distribution for continuous variables (justified by the Central Limit Theorem), and is also the maximum entropy distribution for observations with a given mean and variance. Note that the distribution has a myriad of uses even where those assumptions are not exactly met, as it is often a good approximation.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • loc
    Location parameter.

    • verbose name: Location (Mu)
    • default value: 0.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • scale
    Scale parameter.

    • verbose name: Scale (Sigma)
    • default value: 1.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

ParetoDistribution

Specify a Pareto distribution with a concentration parameter alpha and and scale parameter x_m.

This distribution reflects data follows the Pareto principle (80/20 rule) where 80% of the events come from 20% of the causes.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • concentration
    Shape parameter of the distribution.

    • verbose name: Concentration (Alpha)
    • default value: None
    • port type: Port
    • value type: AnyNumeric (can be None)
  • scale
    Scale parameter of the distribution.

    • verbose name: Scale (X_m)
    • default value: None
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

PoissonDistribution

Specify a Poisson distribution with a given rate lambda.

Can be used to model the number of events in a given time interval or other kinds of counts.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • rate
    Rate parameter.

    • verbose name: Rate (Lambda)
    • default value: None
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

RelaxedBernoulliDistribution

Specify a Relaxed Bernoulli distribution given a temperature tau and probability of a success p.

In contrast to the Bernoulli distribution, the Relaxed Bernoulli distribution is continuous and defined on the interval [0,1]. As the temperature parameter tau approaches zero, the Relaxed Bernoulli distribution approaches the Bernoulli distribution, and becomes discrete, whereas as tau approaches infinity, the Relaxed Bernoulli distribution approaches the uniform distribution. As the Bernoulli, the distribution associates with the integers 0 and 1 outcomes of failure and success, respectively, and the parameter p is the probability of a success. The parameter p can also be specified as the log of the odds p/(1-p), or equivalently log p - log (1-p), aka logits.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • temperature
    Non-negative temperature parameter.

    • verbose name: Temperature (Tau)
    • default value: None
    • port type: Port
    • value type: AnyNumeric (can be None)
  • probs
    Probability of a success.

    • verbose name: Success Probability (P)
    • default value: 0.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • is_logits
    Whether the parameter is specified as logits, i.e ., log p/(1-p) instead of p aka the log-odds.

    • verbose name: Is Logits
    • default value: logits
    • port type: EnumPort
    • value type: str (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

SphericalUniformDistribution

Specify a spherical uniform distribution in d-dimensional space, yielding random d-dimensional vectors of unit length.

This can be used to generate isotropic random directions. See also the von Mises-Fisher distribution for biased random directions.

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • dim
    Number of dimensions of the generated vectors.

    • verbose name: Dimensionality (D)
    • default value: 3
    • port type: IntPort
    • value type: int (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

StudentTDistribution

Specify a Student-t distribution with a given degrees of freedom nu and optionally location mu and scale sigma.

The distribution is used in the t-test but also serves as a general heavy-tailed distribution.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • df
    Degrees of freedom parameter.

    • verbose name: Degrees Of Freedom (Nu)
    • default value: None
    • port type: Port
    • value type: AnyNumeric (can be None)
  • loc
    Location parameter.

    • verbose name: Location (Mu)
    • default value: 0.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • scale
    Scale parameter.

    • verbose name: Scale (Sigma)
    • default value: 1.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

TractableMultivariateNormalDistribution

Specify a tractable multivariate normal (aka Gaussian) distribution parameterized by a location mu, a diagonal vector D, and a tall low-rank factor U.

The resulting covariance or alternatively scale matrix of the distribution then is diag(D) + UU'. This parameterization is numerically stable in high dimensions. In either case the resulting distribution can capture the the dominant components of the covariance matrix without becoming singular due to the diagonal term, and is able to characterize the variance in any variables onto which the dominant components do not project. Note that the scale and cov parameterizations cannot easily be converted into each other, so you have to choose one and specify or estimate the parameters accordingly.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • loc
    Location vector.

    • verbose name: Location Vector (Mu)
    • default value: 0.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • diag
    Diagonal of matrix, given as a vector.

    • verbose name: Diagonal Vector (D)
    • default value: [[1.0]]
    • port type: Port
    • value type: AnyNumeric (can be None)
  • factor
    Additive factor of a low-rank term of size (M, k) where M is the dimensionality of the distribution and k is the rank of the low-rank term.

    • verbose name: Low-Rank Factor (U)
    • default value: [[0.0]]
    • port type: Port
    • value type: AnyNumeric (can be None)
  • form
    Form of the parameterization. If set to cov, then D is a vector of variances, and cov = diag(D) + UU'. If set to scale, then diag is a vector of standard deviations, and the scale matrix is S = diag(D) + UU', and the covariance matrix is then cov = SS'. Note that not all backends support both parameterizations.

    • verbose name: Parameterization
    • default value: cov
    • port type: EnumPort
    • value type: str (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

TruncatedNormalDistribution

Specify a truncated normal distribution with a given location mu, scale sigma, and low/high truncation points a and b.

Note that this formulation truncates in data space (like the wikipedia article), while some other conventions truncate in standard deviations, which is a frequent source of confusion.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • loc
    Location parameter.

    • verbose name: Location (Mu)
    • default value: 0.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • scale
    Scale parameter.

    • verbose name: Scale (Sigma)
    • default value: 1.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • low
    Low truncation point in data space.

    • verbose name: Lower Bound X-Space (A)
    • default value: -2.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • high
    High truncation point in data space.

    • verbose name: Upper Bound X-Space (B)
    • default value: 2.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

UniformDistribution

Specify a Uniform distribution covering the interval between a low value a and high value b.

The distribution is a simple "flat" distribution with equal probability for all values in the interval, and zero probability outside the interval. This is a canonical uninformative prior for a bounded parameter.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • low
    Lower bound (inclusive).

    • verbose name: Lower Bound (A)
    • default value: 0.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • high
    Upper bound (inclusive).

    • verbose name: Upper Bound (B)
    • default value: 1.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

VonMisesDistribution

Specify a von Mises distribution with a given location mu and concentration k.

This distribution is used to model angles on a circle or other wrap-around quantities, and is a close approximation of a normal distribution wrapped around a circle. WARNING: beware that scipy disagrees with Wikipedia and the other backends on the variance of the distribution.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • loc
    Location parameter.

    • verbose name: Location (Mu)
    • default value: None
    • port type: Port
    • value type: AnyNumeric (can be None)
  • concentration
    Concentration / shape parameter.

    • verbose name: Concentration (K)
    • default value: None
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

VonMisesFisherDistribution

Specify a von Mises-Fisher Distribution given a preferential mean direction mu and concentration parameter kappa.

This models random vectors on a unit sphere (dimensionality equal to the length of mu) that are biased towards the mean direction, with an approximately Gaussian spread wrapped around the sphere.

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • mean_direction
    Mean direction of generated vectors.

    • verbose name: Mean Direction
    • default value: None
    • port type: Port
    • value type: AnyNumeric (can be None)
  • concentration
    Concentration / shape parameter.

    • verbose name: Concentration (Kappa)
    • default value: 1.0
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

WeibullDistribution

Specify a Weibull distribution with a given scale lambda and concentration k.

This distribution is used to model time-to-failure and also time between events.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • scale
    Scale parameter.

    • verbose name: Scale (Lambda)
    • default value: None
    • port type: Port
    • value type: AnyNumeric (can be None)
  • concentration
    Shape parameter.

    • verbose name: Concentration (K)
    • default value: None
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)

WishartDistribution

Specify a Wishart distribution of positive definite matrices, parameterized by degrees of freedom nu and a lower-triangular scale matrix L.

The scale parameter can be obtained, for example, as a cholesky factor of a covariance matrix. The Wishart distribution is a distribution over positive definite matrices (for example, covariance matrices) and is the conjugate prior for the precision matrix (inverse covariance matrix) of a multivariate normal distribution.

More Info...

Version 1.0.0

Ports/Properties

  • metadata
    User-definable meta-data associated with the node. Usually reserved for technical purposes.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • dist
    The resulting distribution object.

    • verbose name: Dist
    • default value: None
    • port type: DataPort
    • value type: Distribution (can be None)
    • data direction: OUT
  • df
    Degrees of freedom.

    • verbose name: Degrees Of Freedom (Nu)
    • default value: 1
    • port type: FloatPort
    • value type: float (can be None)
  • scale_tril
    Lower triangular scale matrix.

    • verbose name: Scale Matrix (L)
    • default value: [[1.0]]
    • port type: Port
    • value type: AnyNumeric (can be None)
  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • backend
    Optional compute backend to use. Default is specific to the current context (e.g., as per WithBackend, DeepLearning, Inference nodes). All backends should return the same numbers to good numeric accuracy, although sampling will generally return different samples, and most backends support the most common distributions. For more esoteric distributions or their properties, scipy has the best coverage, followed by tfp, numpyro, torch, and distrax. All backends work on CPU, but performance can differ markedly between backends, even on CPU. Only the non-scipy backends work on the GPU. If you intend to take derivatives of expressions involving distributions, you will generally need to use one of the jax backends. If you are using the Inference nodes, the recommended backend is numpyro, but you may also try other jax-based backends. For use within pure deep learning, you also have to use jax backends, and distrax and numpyro are probably the best choices, followed by tfp due to the potentially lower speed. The torch backend is mainly useful within algorithms where the data is already on torch. If you aim to process batches of distributions (with different parameters), you must also use any of the non-scipy backends.

    • verbose name: Backend
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • axis_pairing
    How to pair axes of the distribution parameter(s), if these parameters are specified with axes (e.g ., as blocks). In 'positional' mode, axes are paired by their position according to a right alignment, that is, the last axis of the first operand is paired with the last axis of the second operand, and so on, while any missing axes behave as if they were unnamed axes of length 1 (this is the same way plain n-dimensional arrays pair in Python/numpy). In 'matched' mode, axes are paired by their type and optionally label, where the axis order of the first operand is preserved in the output, optionally with additional axes that only occur in the subsequent operands prepended on the left. The other operands then have their axes reordered to match. In matched mode, the axes will also follow the order dictated by any ambient plate (With Stacked Variables) context if those contexts were set to pertain to an axis. All axis classes are treated as distinct, except for the plain axis, which is treated as a wildcard axis that can pair with any other axis. The 'default' value resolves to a value that may be overridden in special contexts (mainly the ambient Inference node) and otherwise resolves to the setting of the configuration variable default_axis_pairing, which is set to 'positional' in 2024.x. See also the 'label_handling' property for how labels are treated in this mode. Note that axis pairing can be subtle, and it is recommended to not blindly trust that the default behavior is always what the user intended.

    • verbose name: Axis Pairing
    • default value: default
    • port type: EnumPort
    • value type: str (can be None)
  • label_pairing
    How to treat axis labels when pairing axes in 'matched' mode. In 'always' mode, labels are always considered significant, and axes with different labels are always considered distinct, which means that, if the two operands each have an axis of same type but with different labels, each operand will have a singleton axis inserted to pair with the respective axis in the other operand. In 'ignore' mode, labels are entirely ignored when pairing axes; this means that, if multiple axes of the same type occur in one or more operands, the last space axis in the first operand is paired with the last space axis in the second operand, etc. as in positional mode. In 'auto' mode, labels are only considered significant if they are necessary for distinguishing two or more axes of the same type in any of the operands, or if they occur on a plain axis.

    • verbose name: Label Pairing
    • default value: auto
    • port type: EnumPort
    • value type: str (can be None)