theochem / Selector

Python library of algorithms for selecting diverse subsets of data for machine-learning.
https://selector.qcdevs.org
GNU General Public License v3.0
22 stars 22 forks source link

Fix the numerical stability issue of log det function (fixes #229) #230

Closed FanwangM closed 4 months ago

FanwangM commented 4 months ago

I also updated the tests. The natural logarithm is used instead of the logarithm base 10 (common logarithm) because this is only a constant scaling, which does not affect the relative ranking of diversity measures.

The numerical stability issue is explained in https://github.com/theochem/Selector/issues/229.

codecov[bot] commented 4 months ago

Codecov Report

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

Project coverage is 95.88%. Comparing base (d931154) to head (cfdf840). Report is 5 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/theochem/Selector/pull/230/graphs/tree.svg?width=650&height=150&src=pr&token=0UJixrJfNJ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=theochem)](https://app.codecov.io/gh/theochem/Selector/pull/230?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=theochem) ```diff @@ Coverage Diff @@ ## main #230 +/- ## ========================================== - Coverage 96.00% 95.88% -0.12% ========================================== Files 9 9 Lines 975 972 -3 ========================================== - Hits 936 932 -4 - Misses 39 40 +1 ``` | [Files](https://app.codecov.io/gh/theochem/Selector/pull/230?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=theochem) | Coverage Δ | | |---|---|---| | [selector/diversity.py](https://app.codecov.io/gh/theochem/Selector/pull/230?src=pr&el=tree&filepath=selector%2Fdiversity.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=theochem#diff-c2VsZWN0b3IvZGl2ZXJzaXR5LnB5) | `98.55% <100.00%> (+0.01%)` | :arrow_up: |