Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Avoiding zeros in NMF β loss calculation causes inconsistency #25438

Description

@yotamcons

WH_data[WH_data == 0] = EPSILON

The line WH_data[WH_data == 0] = ΕPSILON as part of the β loss calculation creates a situation where some entries in the data that were larger than other (say 1E-09 was larger than zero) are now smaller than the other.
I think the code should be corrected to
WH_data[WH_data < EPSILON] = ΕPSILON
to avoid such inconsistencies.
Another issue is preventing overflows in the devision that happens a few lines later - if the data has the smallest positive number (around 10^-38), dividing a number larger than 1 by it causes the overflow.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions