-
-
Notifications
You must be signed in to change notification settings - Fork 73
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 trait f64 f32 for 1d inverse to ArgminInv #346
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #346 +/- ##
==========================================
- Coverage 93.38% 93.35% -0.03%
==========================================
Files 119 117 -2
Lines 18979 18803 -176
==========================================
- Hits 17724 17554 -170
+ Misses 1255 1249 -6
☔ View full report in Codecov by Sentry. |
Thanks a lot!! :)
Have you seen this section of the book? The CI passes, so it should be fine.
You should be able to get an |
Thanks, I could get it after a couple of try -> BTW: I was wondering how to get a termination done with newton when for instance $f^\prime'/f^{\prime\prime}' is below a certain tolerance level. I am also thinking about getting a 1d version where the optimum should remain within an interval (for instance when the function is undefined (+infty) out of the bounds. But for that maybe I just implement a special solver since it is arguably quite special. Many thanks in any cases, the library works like a charm. |
Unfortunately argmin doesn't yet allow users to create their own stopping criteria (#91). You could however add this stopping criterion to the solver and issue a PR, similarly to how it is done here.
argmin unfortunately doesn't have a proper concept of bounds yet (apart from Simulated Annealing and Particle Swarm Optimization, where it is quite straight-forward). You can implement this in your own code by implementing the
Thanks! :) |
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.
Thanks a lot! :)
I tried to implement the f64/f32 standard inverse for the ArgminInv (modification in the implementation of inv for ndarray).
I also added a test for it.
For unknown compilation reasons on my machine (admittedly weird linux conf), I could not run the test nor use the library locally to check if that works. I will have to look later into it.
I am also not sure if this is what was needed (as a fully newcomer into rust).
Short Update: I could run the optimization for scalar function, it seems to work. I am not sure how to get the resulting
get_best_param
orget_param
in the end, it seems that this function changed in 0.8.