-
Notifications
You must be signed in to change notification settings - Fork 272
Python: optional parametrization of W
when reformulating (non)linear least-squares cost as external cost
#1377
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
Conversation
6b65209
to
fd9ff7c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, only some comments. Should W_params be a concatentation of W columns or the W matrix directly?
W
when reformulating (non)linear least-squares cost as external costW
when reformulating (non)linear least-squares cost as external cost
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe appending the values and symbolics for the parameters is more restrictive than useful here.
One common scenario could be W_0 = diag(p_w), W = diag(p_w), W_e = diag(p_w[:nx])
.
As it is now, the function does not allow "reusing" parameters in this way.
If this limitation is acceptable, we should maybe sanitize the input, such that param_W
etc. do not depend on each other.
7c2d220
to
a915157
Compare
Extend
translate_cost_to_external_cost
with an optional parametrization of the weighting matrix. The user now needs to provide additionalp
andp_global
symbolics (and values).Also: Improve checks in setters of
parameter_values
andp_global_values