Merged
Conversation
…hms from bounds transforms This is a potential feature which would simplify and clarify the difference between an algorithm which supports bounds "out of the box" like L-BFGS-B or (as I recently discovered) Nelder-Mead from those which support it via a MINUIIT-style change of coordinates. These changes of coordinates are now a separate trait, and `Bounds` implements this trait. Algorithms which don't natively support bounds can add a bounds transform with a different method from the `with_bounds` method: `with_transform`. Transformations are also nice because they can transform an entire problem space. For example, when fitting a multivariate normal distribution, symmetric positive-semidefinite covariance matrices are not only desirable, but required. However, with box bounds alone, there is no way to ensure this quality. A coordinate transform (`SymmetricPositiveSemidefiniteTransform`) ensures this property, allowing internal parameters to take any value given by the algorithm in the same way that bounds transforms allow algorithms to work on an unbounded space.
…tency in MaxSteps, and add message to MaxSteps
… setting names in minimizations
… L-BFGS-B. However, this will need a refactor, I'm running into some issues with how this currently is set up, but I wanted to commit this just to make sure I have it
…Input on standard cost function, finish and test transforms, and add demo spherical coordinate transform
…tional to_internal_jacobian/hessian methods, remove SPD transform, and some perf lints
Big change to make it easier for users to not only implement their own bounds methods, but also to use legacy methods like Minuit/LMFIT bounds. Also a bunch of clippy lints and docstrings.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## refactor-unified-api #78 +/- ##
=========================================================
+ Coverage 55.15% 86.99% +31.83%
=========================================================
Files 27 32 +5
Lines 3771 5936 +2165
=========================================================
+ Hits 2080 5164 +3084
+ Misses 1691 772 -919 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
CodSpeed Performance ReportMerging #78 will improve performances by 31.69%Comparing Summary
Benchmarks breakdown
Footnotes |
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.
This creates a new set of traits to handle transforms and bounds. Not only does it introduce some bounds which are faster to compute, it gives the user a clean interface for choosing and creating their own bounds transformations. The general transforms are also useful in many ways, and we provide an example which shows their versatility. Finally, this removes generic inputs from standard
CostFunctionandGradienttraits and adds newGenericversions of those traits for algorithms which can handle them. This solidifies the choice ofnalgebraas a backend for most standard algorithms. We may in the future make these algorithms more generic via a breaking change if performance is poor on large input spaces (for instance, usingfaerinstead to handle large matrix operations).This generally differentiates algorithms which can natively handle bounds and those which cannot. Additionally, it gives the Nelder-Mead algorithm a native way to handle bounds.