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

Warning in true_divide from dice calculation #762

Closed
1 task
jbteves opened this issue Jul 19, 2021 · 1 comment · Fixed by #786
Closed
1 task

Warning in true_divide from dice calculation #762

jbteves opened this issue Jul 19, 2021 · 1 comment · Fixed by #786
Assignees
Labels
bug issues describing a bug or error found in the project effort: low Theoretically less than a day's work impact: low Improving code/documentation cleanliness/clarity, not function priority: low issues that are not urgent

Comments

@jbteves
Copy link
Collaborator

jbteves commented Jul 19, 2021

Summary

While running main, we can currently experience a RuntimeWarning from dividing by zero during the dice coefficient calculation. This is due to some changes to the dice calculation function during the metric modularization.

Additional Detail

Next Steps

  • Patch
@jbteves jbteves added the bug issues describing a bug or error found in the project label Jul 19, 2021
@jbteves jbteves self-assigned this Jul 19, 2021
@tsalo tsalo added effort: low Theoretically less than a day's work impact: low Improving code/documentation cleanliness/clarity, not function priority: low issues that are not urgent labels Aug 18, 2021
@tsalo
Copy link
Member

tsalo commented Aug 30, 2021

Just for posterity, here is some info from the four-echo integration test where this shows up.

The warning

tedana/tests/test_integration.py::test_integration_four_echo
  /tmp/src/tedana/tedana/utils.py:201: RuntimeWarning: invalid value encountered in true_divide
    dsi = (2. * intersection.sum(axis=axis)) / arr_sum

The component table (well, the relevant metrics)

Component countsigFT2 countsigFS0 dice_FT2 dice_FS0 countnoise
ICA_00 684 0 0 0 4371
ICA_01 3143 68 0.427067 0 4170
ICA_02 3712 295 0.436294 0 4178
ICA_03 3499 322 0.379043 0 4110
ICA_04 1356 130 0.542028 0 4352
ICA_05 3834 270 0.381911 0 4475
ICA_06 3657 474 0.464022 0 4392
ICA_07 3008 610 0.343021 0 4226
ICA_08 2298 57 0.672971 0 2894
ICA_09 3127 137 0.453741 0 4246
ICA_10 3753 517 0.404087 0 4376
ICA_11 2759 441 0.428519 0 4318
ICA_12 2396 301 0.265506 0 4385
ICA_13 3751 106 0.463966 0 4276
ICA_14 2875 116 0.463261 0 4339
ICA_15 3747 777 0.439504 0 4373
ICA_16 5840 896 0.44765 0 4165
ICA_17 3400 320 0.42049 0 4407
ICA_18 2589 125 0.600348 0 3720
ICA_19 130 53 0 0 4719
ICA_20 2963 605 0.406025 0 4181

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issues describing a bug or error found in the project effort: low Theoretically less than a day's work impact: low Improving code/documentation cleanliness/clarity, not function priority: low issues that are not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants