![]() |
Sleipnir Python API
|
Public Member Functions | |
| None | __init__ (self, Real|float expression, Real|float wrt) |
| None | __init__ (self, Real|float expression, Matrix|Submatrix wrt) |
| Matrix | get (self) |
| scipy.sparse.csc_matrix[numpy.float64] | value (self) |
This class calculates the Hessian of an expression 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 expression is
nonlinear or its quadratic coefficients depend on parameters.
Template Args:
Scalar: Scalar type.
UpLo: Which part of the Hessian to compute (Lower or Lower |
Upper). Default is Lower | Upper.
Constructs a Hessian object.
Args:
expression: Expression of which to compute the Hessian.
wrt: Variable with respect to which to compute the Hessian.
| Matrix sleipnir.autodiff.Hessian.get | ( | self | ) |
Returns the Hessian as a Matrix.
This is useful when constructing optimization problems with
derivatives in them.
Returns:
The Hessian as a Matrix.
| scipy.sparse.csc_matrix[numpy.float64] sleipnir.autodiff.Hessian.value | ( | self | ) |
Evaluates the Hessian at wrt's value.
Returns:
The Hessian at wrt's value.