Var#

class liesel.model.nodes.Var(value, distribution=None, name='')[source]#

Bases: object

A variable wrapping a value and a distribution node.

Methods

all_input_nodes()

Returns all input nodes as a frozen set.

all_input_vars()

Returns all input variables as a frozen set.

all_output_nodes()

Returns all output nodes as a frozen set.

all_output_vars()

Returns all output variables as a frozen set.

update()

Updates the variable.

Attributes

info

Additional meta-information about the variable as a dict.

dist_node

The distribution node of the variable.

groups

The groups the variable belongs to.

has_dist

Whether the variable has a probability distribution.

log_prob

The log-probability of the variable.

model

The model the variable is part of.

name

The name of the variable.

nodes

The nodes of the variable as a list.

observed

Whether the variable is observed.

parameter

Whether the variable is a parameter.

role

The role of the variable.

strong

Whether the variable is strong.

value

The value of the variable.

value_node

The value node of the variable.

var_value_node

The proxy node for the value of the variable.

weak

Whether the variable is weak.