TransientDist

Contents

TransientDist#

class liesel.model.nodes.TransientDist(distribution, *inputs, _name='', _needs_seed=False, **kwinputs)[source]#

Bases: TransientNode, Dist

A transient distribution node that does not cache its value.

Methods

add_inputs(*inputs, **kwinputs)

Adds non-keyword and keyword input nodes to the existing ones.

all_input_nodes()

Returns all non-keyword and keyword input nodes as a unique tuple.

all_output_nodes()

Returns all output nodes as a unique tuple.

clear_state()

Clears the state of the node.

flag_outdated()

Flags the node and its recursive outputs as outdated.

init_dist()

Initializes the distribution.

set_inputs(*inputs, **kwinputs)

Sets the non-keyword and keyword input nodes.

update()

Does nothing.

Attributes

at

Where to evaluate the distribution.

distribution

The wrapped distribution.

groups

The groups that this node is a part of.

inputs

The non-keyword input nodes.

kwinputs

The keyword input nodes.

log_prob

The log-probability of the distribution.

model

The model the node is part of.

name

The name of the node.

needs_seed

Whether the node needs a seed / PRNG key.

outdated

Whether the node is outdated.

outputs

The output nodes.

per_obs

Whether the log-probability is stored per observation or summed up.

state

The state of the node with the value None.

value

The value of the node.

var

The variable the node is part of.

monitor

Whether the node should be monitored by an inference algorithm.