bayespy.inference.vmp.nodes.stochastic.Distribution

class bayespy.inference.vmp.nodes.stochastic.Distribution[source]

A base class for the VMP formulas of variables.

Sub-classes implement distribution specific computations.

If a sub-class maps the plates differently, it needs to overload the following methods:

  • compute_weights_to_parent

  • plates_to_parent

  • plates_from_parent

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(*args, **kwargs)

Initialize self.

compute_message_to_parent(parent, index, …)

Compute the message to a parent node.

compute_weights_to_parent(index, weights)

Maps the mask to the plates of a parent.

plates_from_parent(index, plates)

Resolve the plate mapping from a parent.

plates_to_parent(index, plates)

Resolves the plate mapping to a parent.

random(*params[, plates])

Draw a random sample from the distribution.

squeeze(axis)

Squeeze a plate axis from the distribution