getObjective: Closure for generating a penalized least squares loss...

Description Usage Arguments See Also

Description

This function is a closure that creates a loss function that takes a weight vector as an argument. It produces a function that is passed to closure that generates the optimization function – this optimization function takes initial weight value and produces an optimized weight value. The closure takes a graph vertex as an argument. The algorithm identifies the incoming edges to the vertex, then pulls the weights from those edges, constructing a weight vector. This weight vector is the argument for the loss function, and is used as the starting values in the optimization. The function calculates squared error loss by first taking this weight vector input and predicting the outcome variable, then calculating loss from the predicted and observed values.

Usage

1
getObjective(initial_graph, v)

Arguments

initial_graph

an initialized signal graph, the prefix 'initial' in 'initial_graph' is in contrast to candidate graphs against which the initial_graph will be compared in the optimization.

v

the vertex whose weights will be optimized.

See Also

fit_weights_for_node, getObjective, getOptimizationFunction, getOptimizationFunctionNG, getPrediction


robertness/signalgraph documentation built on May 27, 2019, 10:33 a.m.