Sleipnir Python API
Loading...
Searching...
No Matches
jormungandr.autodiff.Hessian Class Reference

Public Member Functions

None __init__ (self, Variable variable, VariableMatrix wrt)
 
VariableMatrix get (self)
 
scipy.sparse.csc_matrix[float] value (self)
 

Detailed Description

This class calculates the Hessian of a variable with respect to a
vector of variables.

The gradient tree is cached so subsequent Hessian calculations are
faster, and the Hessian is only recomputed if the variable expression
is nonlinear.

Constructor & Destructor Documentation

◆ __init__()

None jormungandr.autodiff.Hessian.__init__ (   self,
Variable  variable,
VariableMatrix  wrt 
)
Constructs a Hessian object.

Parameter ``variable``:
    Variable of which to compute the Hessian.

Parameter ``wrt``:
    Vector of variables with respect to which to compute the Hessian.

Member Function Documentation

◆ get()

VariableMatrix jormungandr.autodiff.Hessian.get (   self)
Returns the Hessian as a VariableMatrix.

This is useful when constructing optimization problems with
derivatives in them.

◆ value()

scipy.sparse.csc_matrix[float] jormungandr.autodiff.Hessian.value (   self)
Evaluates the Hessian at wrt's value.

The documentation for this class was generated from the following file: