-
Notifications
You must be signed in to change notification settings - Fork 5
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
Maximum likelihood for Rainbow #407
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #407 +/- ##
==========================================
- Coverage 82.45% 82.41% -0.04%
==========================================
Files 9 9
Lines 2570 2565 -5
==========================================
- Hits 2119 2114 -5
Misses 451 451 ☔ View full report in Codecov by Sentry. |
CodSpeed Performance ReportMerging #407 will not alter performanceComparing Summary
|
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.
Thank you, @karpov-sv, it looks really nice. I'd like @erusseil to review it before the merge.
@karpov-sv, do you think it may go to a patch (e.g. 0.9.4) release?
Yes, it would be ok, as the code is declared experimental anyway. The changes from the point of view of "primary" API should be minimal (just a bit more stable). |
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 Sergey for the work, it looks promising! I made some tests and everything appears very robust to me.
… support and additional penalties for going too close to parameter limits for more reliable error estimation
…he covariance, if requested
for more information, see https://pre-commit.ci
@karpov-sv @erusseil v0.9.4 has been released, and you both are now listed as co-authors of the package (as I should do earlier). Thank you! |
Switch Rainbow to maximum likelihood based cost function. It allows to correctly implement upper limits (using Tobit model for censored data) and additional barrier terms that would prevent the parameters from wandering too close to their limits (as then Hessian estimation would be wrong, giving extremely large errors, due to internal non-linear transformations of the parameters inside iminuit).
Improve initial values estimation and make them a bit more error-prone.
Optimize some computations inside model function (
zeros_like
is much slower than plainzeros
)Also, slightly improve code readability by generalizing parameter unscaling. It allows to correctly return the covariance matrix.