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

Fix threshold computation handling nan values #333

Merged
merged 3 commits into from
Nov 9, 2023

Conversation

giodavoli
Copy link
Contributor

Closes #327

Replaced np.std and np.mean respectively with np.nanstd() and np.nanmean()

Copy link

codecov bot commented Nov 9, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (dd20ef7) 83.40% compared to head (1254121) 82.55%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #333      +/-   ##
==========================================
- Coverage   83.40%   82.55%   -0.86%     
==========================================
  Files         100      100              
  Lines        7245     7550     +305     
  Branches     1275     1353      +78     
==========================================
+ Hits         6043     6233     +190     
- Misses        905      980      +75     
- Partials      297      337      +40     
Files Coverage Δ
nannyml/thresholds.py 85.71% <100.00%> (ø)

... and 4 files with indirect coverage changes

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

@nnansters nnansters merged commit fcc72e7 into NannyML:main Nov 9, 2023
6 of 7 checks passed
@nnansters
Copy link
Contributor

Hey @giodavoli , just added a quick test to numerically verify the fix. You raised an excellent point on about dealing with NaN's, it's something we've not tested enough for. I'll add this to the engineering backlog. In the meantime if you run into issues, don't hesitate to log and maybe even propose a fix.

In any case: thank you very much for taking the time to investigate, report and eventually fix this issue!

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.

Incorrect Threshold Computation for KolmogorovSmirnovStatistic When Handling NaN Values.
3 participants