numdifftools.nd_algopy.Hessian¶
-
class
numdifftools.nd_algopy.
Hessian
(f, method='forward')[source][source]¶ Calculate Hessian with Algorithmic Differentiation method
Parameters: f : function
function of one array f(x, *args, **kwds)
method : string, optional {‘forward’, ‘reverse’}
defines method used in the approximation
Returns: hess : ndarray
array of partial second derivatives, Hessian
See also
Notes
Algorithmic differentiation is a set of techniques to numerically evaluate the derivative of a function specified by a computer program. AD exploits the fact that every computer program, no matter how complicated, executes a sequence of elementary arithmetic operations (addition, subtraction, multiplication, division, etc.) and elementary functions (exp, log, sin, cos, etc.). By applying the chain rule repeatedly to these operations, derivatives of arbitrary order can be computed automatically, accurately to working precision, and using at most a small constant factor more arithmetic operations than the original program.
Methods
__init__
(f[, method])computational_graph
(x, *args, **kwds)Attributes
f