synthesized-io / insight

🧿 Metrics & Monitoring of Datasets
BSD 3-Clause "New" or "Revised" License
12 stars 0 forks source link

Drop NaN in KolmogorovSmirnov #175

Closed tomcarter23 closed 5 months ago

tomcarter23 commented 5 months ago

With the current setup, where there was 1 or more NaN values in either of the pd.Series used in the KS calculation NaN was returned. This is not the desired behaviour, instead we want NaN values to be ignored.

This PR adjusts the metric to ensure that NaN values are dropped from each series before calculation.

sonarcloud[bot] commented 5 months ago

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (5f215f8) 78.6% compared to head (b984297) 78.6%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/synthesized-io/insight/pull/175/graphs/tree.svg?width=650&height=150&src=pr&token=S8CD8EN4AF&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=synthesized-io)](https://app.codecov.io/gh/synthesized-io/insight/pull/175?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=synthesized-io) ```diff @@ Coverage Diff @@ ## master #175 +/- ## ====================================== Coverage 78.6% 78.6% ====================================== Files 11 11 Lines 970 970 Branches 161 161 ====================================== Hits 763 763 Misses 154 154 Partials 53 53 ``` | [Files](https://app.codecov.io/gh/synthesized-io/insight/pull/175?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=synthesized-io) | Coverage Δ | | |---|---|---| | [src/insight/metrics/metrics.py](https://app.codecov.io/gh/synthesized-io/insight/pull/175?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=synthesized-io#diff-c3JjL2luc2lnaHQvbWV0cmljcy9tZXRyaWNzLnB5) | `91.5% <100.0%> (ø)` | |