Conversation
… and returns all solutions
…make their own plots
Owner
Author
|
Jaxopt is deprecated so I'm not sure it is a good idea to rely on it. There is another code called qpax which might be a viable alternative. |
Owner
Author
|
MPAX also looks good (https://github.com/MIT-Lu-Lab/MPAX). After some initial testing, qpax seems to struggle to converge. |
…tialisation out of functions
…iggest issue is the interior point solver in v1 vs admm in v2
… to module level - Replace jaxopt.OSQP (ADMM) with qpax primal-dual interior point solver; warm-call time drops from ~1400ms to ~2ms for N=6 on CPU - Cache derivative_prefactors() results keyed by (fn, x, norm_x, norm_y, N) so the autodiff chain is only computed once per unique dataset/model - Lift _dcf and _flip_sign to module level so JAX's JIT cache persists across calls (previously recompiled on every qp() invocation) - Switch qpsignsearch to use chi-squared as comparison metric instead of OSQP internal error; simplify state tuple (remove c, Q, status) - Expand benchmark to cover all four variants (v1-qp, v1-signflip, v2-qp, v2-signsearch) with residuals comparison panel Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…benchmark - _dcf now returns (params, converged) so callers can inspect solver status - qp() and qpsignsearch() return (params, chi2, converged: bool) - qpsignsearch converged=True only if all QP solves along the path converged - tests updated to unpack 3-tuple; polynomial coefficient test checks fit quality instead of exact params (float32 + constraints prevent exact recovery) - constraint sign test uses N=6 (N=8 hits qpax's hardcoded 30-iter limit) - benchmark adds 'qp conv?' column showing convergence for the winning solve Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The goal is to reimplement maxsmooth in JAX to hopefully speed up the code and modernise the package with type hinting, more standardised docstrings and formatting with Ruff. An example call to the new code is shown below. Currently it tests every possible combination of signs on the derivatives.
Key Changes:
To do: