Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Make ODEModel a subclass of CallableNumericalModel #288

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

pckroon
Copy link
Collaborator

@pckroon pckroon commented Dec 13, 2019

This makes ODEModel a subclass of CallableNumericalModel, which magically enables using constraints with ODEModels.
In addition, to preserve existing behaviour, the finite_difference method is moved to CallableModel (everything we can call we can approximate the Jacobian for). This in turn means we now always generate a covariance matrix. Very shiny. The downside is I had to touch everything that made decisions on whether something had a jacobian/hessian. All hasattr(x, 'eval_jacobian/hessian') were changed to appropriate isinstance(x, (Gradient|Hessian)(Model|Objective) to avoid using the finite difference method during minimization, for which it's way too slow.
As a final nit, remove setting of bounds on fixed parameters, since this messes with minimizer selection and doesn't add value.

Fixes #282

@pckroon pckroon requested a review from tBuLi December 13, 2019 13:55
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ODEModel with constraints gives error
1 participant