statsmodels.tools.numdiff.approx_hess3(x, f, epsilon=None, args=(), kwargs={})
[source]
Calculate Hessian with finite difference derivative approximation
Parameters: |
|
---|---|
Returns: |
hess – array of partial second derivatives, Hessian |
Return type: |
ndarray |
Equation (9) in Ridout. Computes the Hessian as:
1/(4*d_j*d_k) * ((f(x + d[j]*e[j] + d[k]*e[k]) - f(x + d[j]*e[j] - d[k]*e[k])) - (f(x - d[j]*e[j] + d[k]*e[k]) - f(x - d[j]*e[j] - d[k]*e[k]))
where e[j] is a vector with element j == 1 and the rest are zero and d[i] is epsilon[i].
This is an alias for approx_hess3
© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.tools.numdiff.approx_hess3.html