Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add function to convert internal derivatives to external ones #319

Open
janosg opened this issue May 7, 2022 · 0 comments
Open

Add function to convert internal derivatives to external ones #319

janosg opened this issue May 7, 2022 · 0 comments

Comments

@janosg
Copy link
Member

janosg commented May 7, 2022

Terminology

Assume we have a criterion function f(params) and its derivative (gradient or jacobian) d.

To enforce constraints, the internal optimizer sees a reparametrized version g(x) = f(r(params)).

By internal derivative we mean the derivative of g with respect to x.

Current situation

We have closed form derivatives of the reparametrization function r and can convert external derivatives to internal ones.

Desired Situation

We also want to convert internal derivatives to external ones, for example when we only calculate an interal derivative numerically but would want to store an external one in the log file.

Proposed implementation

  • implement closed form derivative of unscaling (trivial)
  • calculate numerical derivatives of reparametrize_from_internal
  • combine everything, similar to _derivative_to_internal in conversion.py.

Alternative implementation

Alternatively, we could implement closed form derivatives fo reparametrize_from_internal but I do not think it's worth the work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant