DistRegBuilder#
- class liesel.model.distreg.DistRegBuilder[source]#
Bases:
GraphBuilder
A model builder for distributional regression models.
Methods
add
(*args[, to_float32])Adds nodes, variables or other graph builders to the graph.
add_groups
(*groups[, to_float32])Adds groups 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.
convert_dtype
(from_dtype, to_dtype)Tries to convert the node values in the graph to the specified data type.
copy
()Returns a shallow copy of the graph builder.
Counts the number of times each node name occurs in the graph.
Counts the number of times each variable name occurs in the graph.
groups
()Collects the groups from all nodes and variables.
Plots all nodes in the graph.
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 thenew
node.replace_var
(old, new)Replaces the
old
with thenew
variable.transform
(var[, bijector])Transforms a variable by adding a new transformed variable as an input.
update
()Updates all nodes in the graph.
Attributes
User-defined log-likelihood node, if there is one.
User-defined log-prior node, if there is one.
User-defined log-probability node, if there is one.
The response node.
The nodes that were explicitly added to the graph.
The variables that were explicitly added to the graph.