HARK
HARK copied to clipboard
Finite-difference approximation
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