-
Notifications
You must be signed in to change notification settings - Fork 11
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
Bug Fixes in MLE fits #73
Conversation
|
||
# get fit function with background center | ||
fit_function = get_th228_fit_functions(; background_center = background_center)[fit_func] | ||
|
||
# create loglikehood function: f_loglike(v) that can be evaluated for any set of v (fit parameter) | ||
f_loglike = let f_fit = fit_function, h = h | ||
v -> hist_loglike(Base.Fix2(f_fit, v), h) | ||
v -> hist_loglike(x -> x in Interval(extrema(h.edges[1])...) ? f_fit(x, v) : 0, h) |
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.
Then, also f_loglike_array
might need an update..
… can be determined
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #73 +/- ##
==========================================
- Coverage 15.46% 15.01% -0.45%
==========================================
Files 32 33 +1
Lines 2489 2670 +181
==========================================
+ Hits 385 401 +16
- Misses 2104 2269 +165 ☔ View full report in Codecov by Sentry. |
All tests are finally running again. Fixed all fits and improved with more BGMLE. |
This PR prevents the MLE fits from crashing. Changes made inlcude:
advanced_time_and_memory_control
Possibility to set the maximal used memory and time for a single MLE fit by enabling a specific callback after each step of the iterationsLBFGS
algorithm fromOptim.jl
with theMoreThuente
line search algo from theLineSearches.jl
package. theNalderZhang
seems to perform in general more unstable sometimes doesn't even find a starting point. There are tunable parameters, but theMoreThuente
showed in the current tests on Legend data better results