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

Replace self._pit_samps NaNs with 0. #202

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

drewoldag
Copy link
Collaborator

Problem & Solution Description (including issue #)

We take the approach of simply replacing any NaN values with 0s. And also logging a warning message that it's happening.

Code Quality

  • My code follows the code style of this project
  • I have written unit tests or justified all instances of #pragma: no cover; in the case of a bugfix, a new test that breaks as a result of the bug has been added
  • My code contains relevant comments and necessary documentation for future maintainers; the change is reflected in applicable demos/tutorials (with output cleared!) and added/updated docstrings use the NumPy docstring format
  • Any breaking changes, described above, are accompanied by backwards compatibility and deprecation warnings

@drewoldag drewoldag self-assigned this Oct 31, 2023
@drewoldag drewoldag requested review from eacharles and aimalz October 31, 2023 20:31
Copy link

codecov bot commented Oct 31, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (8eaabd3) 100.00% compared to head (5189377) 99.95%.
Report is 5 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##              main     #202      +/-   ##
===========================================
- Coverage   100.00%   99.95%   -0.05%     
===========================================
  Files           34       33       -1     
  Lines         2284     2286       +2     
===========================================
+ Hits          2284     2285       +1     
- Misses           0        1       +1     
Flag Coverage Δ
unittests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/qp/mixmod_pdf.py 100.00% <100.00%> (ø)
src/qp/metrics/pit.py 98.27% <75.00%> (-1.73%) ⬇️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@drewoldag drewoldag merged commit 7c0dcfe into main Oct 31, 2023
5 of 7 checks passed
@drewoldag
Copy link
Collaborator Author

Even though this is closed out, @aimalz if you want to weigh in on the mathematically best path forward, I would like to hear your input. Eric proposed (and I agreed with) what seems like a reasonable solution to the issue, but it's not 100% clear if it would be better to handle the NaNs in a different way.

@drewoldag drewoldag deleted the issue/201/replace-pit-samp-nans branch May 29, 2024 17:01
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