cg_parameter: Add Parameter

Description Usage Arguments Value Note Author(s) Examples

View source: R/node.R

Description

Add a parameter node to the active graph.

Usage

1

Arguments

value

numerical vector or array, value of the node.

name

character scalar, name of the node (optional). In case argument name is missing, the node is added to the graph under an automatically generated name.

Value

cg_node object.

Note

Parameters are assumed to be subject to some optimization process. Hence, their value might change over time. You can use data member value of a cg_node object to retrieve or change its value.

Author(s)

Ron Triepels

Examples

1
2
3
4
5
# Initialize a computational graph
graph <- cg_graph()

# Add a parameter with value 1 and name 'a' to the graph.
a <- cg_parameter(1, name = "a")

cgraph documentation built on Feb. 9, 2020, 5:07 p.m.

Related to cg_parameter in cgraph...