Predictor#

class liesel.liesel.nodes.Predictor(*inputs, distribution=None, name=None)[source]#

Bases: liesel.liesel.nodes.Addition

An addition node representing a regression predictor.

Methods

grad()

Returns the gradient of the model log-probability w.r.t.

input_value_changed()

Informs the node that the value of one of its inputs has changed.

jaxify()

Enables JAX NumPy for the node.

own_value_changed()

Informs the node that its value has changed.

set_value(value[, update])

Sets the value of the node.

unjaxify()

Disables JAX NumPy for the node.

update()

Updates the value and the log-probability of the node.

validate()

Checks if the value and the log-probability of the node are finite.

Attributes

calculator

The calculator of the node.

distribution

The distribution of the node.

has_calculator

Whether the node has a calculator.

has_distribution

Whether the node has a distribution.

has_model

Whether the node is part of a model.

has_name

Whether the node has a name.

inputs

All inputs of the node as a set.

jaxified

Whether JAX NumPy is enabled for the node.

log_prob

The log-probability of the node.

model

The model the node is part of.

name

The name of the node.

outdated

Whether the node is outdated.

outputs

An output of a node A is a node B which depends on the value of A.

state

The value and the log-probability as a NodeState.

strong

Whether the node is strong.

value

The value of the node.

weak

Whether the node is weak.