bayespy.inference.vmp.nodes.node.Node

class bayespy.inference.vmp.nodes.node.Node(*parents, dims=None, plates=None, name='', notify_parents=True, plotter=None, plates_multiplier=None, allow_dependent_parents=False)[source]

Base class for all nodes.

mask dims plates parents children name

Sub-classes must implement: 1. For computing the message to children:

get_moments(self):

  1. For computing the message to parents: _get_message_and_mask_to_parent(self, index)

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

_compute_weights_to_parent(index, weights) _plates_to_parent(self, index) _plates_from_parent(self, index)

__init__(*parents, dims=None, plates=None, name='', notify_parents=True, plotter=None, plates_multiplier=None, allow_dependent_parents=False)[source]

Methods

__init__(*parents[, dims, plates, name, ...])

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

move_plates(from_plate, to_plate)

plot([fig])

Plot the node distribution using the plotter of the node

set_plotter(plotter)

Attributes

plates

plates_multiplier

Plate multiplier is applied to messages to parents