-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[hist] Using TKDE::Fill works with empty tkde #14740
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
base: master
Are you sure you want to change the base?
Conversation
Can one of the admins verify this patch? |
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 for fixing the TKDE when updating the data with Fill.
I agree the SetKernel() is needed in the InitFromNewData function, since by adding the data both the fixed bandwidth and the adaptive one needs to be re-computed.
A possible optimisation would be to have a function UpdateKernel
, which will re-use the existing kernel, but just changing the fixed bandwidth or the adaptive one, depending on the case.
@phsft-bot build |
Starting build on |
Build failed on ROOT-ubuntu2004/python3. |
Build failed on ROOT-ubuntu2204/nortcxxmod. Failing tests: |
Build failed on windows10/default. Failing tests: |
Build failed on ROOT-performance-centos8-multicore/soversion. Failing tests: |
Build failed on mac12arm/cxx20. Failing tests: |
Test Results 20 files 20 suites 3d 6h 31m 6s ⏱️ Results for commit 9d189d2. ♻️ This comment has been updated with latest results. |
as suggested by lmoneta. This was causing a test to fail. The normalisation of the TKDE was wrong, because now nSum was (in case of unbinned, useCount=false) computed from all events, instead it should be computed from all the events in the range (see SetBinCounts).
as suggested by lmoneta
Hello @ferdymercury, thanks for following up on this PR! I have rebased on master and squashed the last three commits that deal with the added test. @lmoneta It would be good to obtain a review and land this PR if the CI is happy |
@guitargeek see mac15 RPATH? failure with gfortran |
Looks like the mac15 runners have inconsistent environments:
Indeed, the last build to produce the artifacts for the incremental PR builds was produced on @couet, can we bring |
@guitargeek The gfortran version ready for download is 14.2. See https://github.com/fxcoudert/gfortran-for-macOS/releases . Is it ok if I update our nodes to this one ? |
Yes, that would be nice. Thanks! |
Related question: what is the current gfortran version of mac13 and mac14 (where h2root fails) ? Just mentioning since I see in the gcc12 relnotes: |
Ok I already put 13.2 on macphsft31:
But as its looks like for sequoia it is version 14, I will do the update of all our 15.5 machines |
gfortran is now 14.2.0 on the two MacOs 15.5 machines |
Both MacOS 13 machines are running gfortran 12.2.0 |
The two MacOS 14 machines are now running gfortran 14.2.0 |
Fixes #7808
This is happening because in when the parentheses operator overload
TKDE::operator()(Double_t x)
calls ReInit(const_cast<TKDE*>(this))->ReInit()
it returns before setting the fKernel in the case of new data.One approach is to call SetKernel here:
or call it at the end of InitFromNewData().
When that happens, the fKernel is no longer null but this error is reproducible with both iterative options -
With Adaptive we get NaN and Fixed we get inf
This is because the weight calculation is using the nSum that is 0 when binning is not used
Inversing that gives the infinity in the Iteration:Fixed case
This fix:
nullptr
)Results:
Gives
0.487581