Skip to content
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

KDE Boundary Mirror Logic #371

Merged
merged 13 commits into from
Jan 12, 2022
Merged

Conversation

schmitse
Copy link
Contributor

@schmitse schmitse commented Nov 13, 2021

Fixes #

Proposed Changes

  • Change the mirror logic of the KDE1DimExact, KDE1DimGrid, KDE1DimFFT, and KDE1DimISJ to use the boundary of the observable space instead of the minimum/maximum of the data. This prevents unwanted ''bumps'' in the pdf when the data falls to zero inside of the observable range and both edges are mirrored.
  • Updated the bandwidth description in the docstring of the KDE1DimExact and KDE1DimGrid classes to correctly reflect on the available bandwidth options.

Tests added

  • Added tests to the test_kde_funcs.py

Checklist

  • change approved
  • implementation finished
  • correct namespace imported
  • tests added
  • CHANGELOG updated
  • (if new public method/class) docs in rst file updated?

zfit/models/kde.py Outdated Show resolved Hide resolved
zfit/models/kde.py Outdated Show resolved Hide resolved
zfit/models/kde.py Outdated Show resolved Hide resolved
@jonas-eschle
Copy link
Contributor

Hey looks good! I may have missed something in the logic though, but that can be on my side

schmitse and others added 2 commits November 25, 2021 19:06
Co-authored-by: Jonas Eschle <jonas.eschle@cern.ch>
Co-authored-by: Jonas Eschle <jonas.eschle@cern.ch>
@jonas-eschle
Copy link
Contributor

That seems fine so far. If you think the implementation is finished, just remove the WIP in the name and request a review. Make sure to tick of the boxes, so you see that everything is done (e.g. add an entry in the CHANGELOG)

@jonas-eschle
Copy link
Contributor

Hey, was just wondering what's the status of this?

@schmitse
Copy link
Contributor Author

Hi im sorry for the stall. im on it today again.
Fell ill and had work related deadlines coming up.

@schmitse
Copy link
Contributor Author

In the changelog i have added this:

- KDE datasets are now mirrored around observable space limits

to the bugfixes/small changes section. I cannot git add it though, am i supposed to git add -f the changelog or how does it work?

@schmitse
Copy link
Contributor Author

Some coverage tests are showing up as failed.
If i interpret the results correctly, for example from coverage/coveralls then the complaint it from the file: zfit/minimizers/minimizers_scipy.py, which i did not modify?
How can i fix this/ Is there a way i can fix this, @jonas-eschle ? :)

@jonas-eschle jonas-eschle changed the title WIP: KDE Boundary Mirror Logic KDE Boundary Mirror Logic Dec 14, 2021
Copy link
Contributor

@jonas-eschle jonas-eschle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, this looks good! LGTM

@jonas-eschle jonas-eschle merged commit 39d9538 into zfit:develop Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants