Selector icon indicating copy to clipboard operation
Selector copied to clipboard

[Diversity module] Problem of using `shannon_entropy` for computing diversity

Open FanwangM opened this issue 3 years ago • 3 comments

Sometimes, this function can return us an invalid value, NaN. You can reproduce the error by running the notebook as attached with the latest code in this repo. I think the main problem is we may have zeros in the denominator.

diversity_problem.zip

Can you fix this? Thank you. @Khaleeh

FanwangM avatar May 13 '22 03:05 FanwangM

We should check if this is still a problem. If so, we will need to fix the bug.

FanwangM avatar May 29 '23 05:05 FanwangM

Write a test to check this. It's a relatively straightforward task, consisting of converting the notebook that shows the issue into a test.

PaulWAyers avatar May 29 '23 19:05 PaulWAyers

This is addressed in https://github.com/theochem/Selector/pull/177.

FanwangM avatar Jun 25 '24 15:06 FanwangM