rs-station / reciprocalspaceship

Tools for exploring reciprocal space
https://rs-station.github.io/reciprocalspaceship/
MIT License
28 stars 11 forks source link

add `rs.utils.weighted_pearsonr` and tests #189

Closed kmdalton closed 1 year ago

kmdalton commented 1 year ago

I wrote a function to compute weighted Pearson correlation coefficients and added it to utils/stats.py.

codecov-commenter commented 1 year ago

Codecov Report

Base: 98.35% // Head: 98.36% // Increases project coverage by +0.01% :tada:

Coverage data is based on head (fa9e7e1) compared to base (8d90ddc). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #189 +/- ## ========================================== + Coverage 98.35% 98.36% +0.01% ========================================== Files 44 44 Lines 1764 1775 +11 ========================================== + Hits 1735 1746 +11 Misses 29 29 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `98.36% <100.00%> (+0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Hekstra-Lab#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/Hekstra-Lab/reciprocalspaceship/pull/189?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Hekstra-Lab) | Coverage Δ | | |---|---|---| | [reciprocalspaceship/utils/\_\_init\_\_.py](https://codecov.io/gh/Hekstra-Lab/reciprocalspaceship/pull/189/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Hekstra-Lab#diff-cmVjaXByb2NhbHNwYWNlc2hpcC91dGlscy9fX2luaXRfXy5weQ==) | `100.00% <100.00%> (ø)` | | | [reciprocalspaceship/utils/stats.py](https://codecov.io/gh/Hekstra-Lab/reciprocalspaceship/pull/189/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Hekstra-Lab#diff-cmVjaXByb2NhbHNwYWNlc2hpcC91dGlscy9zdGF0cy5weQ==) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Hekstra-Lab). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Hekstra-Lab)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.