bayespy.inference.vmp.nodes.deterministic.Deterministic

class bayespy.inference.vmp.nodes.deterministic.Deterministic(*args, **kwargs)[source]

Base class for deterministic nodes.

Sub-classes must implement: 1. For implementing the deterministic function:

_compute_moments(self, *u)

  1. One of the following options: a) Simple methods:

    _compute_message_to_parent(self, index, m, *u)

    1. More control with: _compute_message_and_mask_to_parent(self, index, m, *u)

Sub-classes may need to re-implement: 1. If they manipulate plates:

_compute_weights_to_parent(index, mask) _compute_plates_to_parent(self, index, plates) _compute_plates_from_parent(self, index, plates)

__init__(*args, **kwargs)[source]

Methods

__init__(*args, **kwargs)

add_plate_axis(to_plate)

broadcasting_multiplier(plates, *args)

delete()

Delete this node and the children

get_mask()

get_moments()

get_pdf_nodes()

get_shape(ind)

has_plotter()

Return True if the node has a plotter

lower_bound_contribution([gradient])

move_plates(from_plate, to_plate)

plot([fig])

Plot the node distribution using the plotter of the node

random()

set_plotter(plotter)

Attributes

plates

plates_multiplier

Plate multiplier is applied to messages to parents