Open bjarthur opened 8 years ago
I'm very confused. What does this do? Why do you need a function to compute the jacobian if you already have functions to evaluate derivatives?
this packages up the output of the derivatives into a single function which returns the Jacobian matrix. since it uses the same interface as it's finite difference counterpart, it's easy to switch between the two. for example, the code structure between the analytic and finite-difference versions of levenberg-marquardt least squares fit can be nearly identical with the addition of these two functions.
i wrote counterparts to the existing
finite_difference_jacobian
for the case where the function of interest is analytically differentiable. happy to submit a PR if there is interest. would just need to know the best place to put it.