DistRegBuilder#

class liesel.model.distreg.DistRegBuilder[source]#

Bases: liesel.model.model.GraphBuilder

A model builder for distributional regression models.

Methods

add(*args)

Adds nodes, variables or other graph builders to the graph.

add_group(name, **kwargs)

Adds a group to the graph.

add_np_smooth(X, K, a, b, predictor[, name])

Adds a non-parametric smooth to the model builder.

add_p_smooth(X, m, s, predictor[, name])

Adds a parametric smooth to the model builder.

add_predictor(name, inverse_link)

Adds a predictor to the model builder.

add_response(response, distribution)

Adds the response to the model builder.

build_model([copy])

Builds a model from the graph.

copy()

Returns a shallow copy of the graph builder.

count_node_names()

Counts the number of times each node name occurs in the graph.

count_var_names()

Counts the number of times each variable name occurs in the graph.

plot_nodes()

Plots all nodes in the graph.

plot_vars()

Plots all variables in the graph.

rename(pattern, replacement)

Renames all nodes and variables in the graph.

rename_nodes(pattern, replacement)

Renames all nodes in the graph.

rename_vars(pattern, replacement)

Renames all variables in the graph.

replace_node(old, new)

Replaces the old with the new node.

replace_var(old, new)

Replaces the old with the new variable.

transform(var[, bijector])

Transforms a variable by adding a new transformed variable as an input.

update()

Updates all nodes in the graph.

Attributes

log_lik_node

The user-defined log-likelihood node.

log_prior_node

The user-defined log-prior node.

log_prob_node

The user-defined log-probability node.

response

The response node.