HARK icon indicating copy to clipboard operation
HARK copied to clipboard

Finite-difference approximation

Open alanlujan91 opened this issue 1 year ago • 0 comments

Just came across some functions that I think could be really useful for us.

approx_fprime(xk, f[, epsilon]) | Finite difference approximation of the derivatives of a scalar or vector-valued function.

check_grad(func, grad, x0, *args[, epsilon, ...]) | Check the correctness of a gradient function by comparing it against a (forward) finite-difference approximation of the gradient.

In more complex problems, this could help us figure out if our Marginal Value functions are correct since we are not using numerical derivatives.

https://docs.scipy.org/doc/scipy/reference/optimize.html#finite-difference-approximation

alanlujan91 avatar May 24 '23 13:05 alanlujan91