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

division by zero error 'sinkhorn' optimization #50

Open
zoepiran opened this issue Jun 7, 2021 · 0 comments
Open

division by zero error 'sinkhorn' optimization #50

zoepiran opened this issue Jun 7, 2021 · 0 comments

Comments

@zoepiran
Copy link

zoepiran commented Jun 7, 2021

Performing reconstruction with marker genes and initializing with a low epsilon (5e-4; currently the default value) tends to raise one (or both) of the following warnings:
/usr/local/lib/python3.7/dist-packages/ot/bregman.py:363: RuntimeWarning: divide by zero encountered in true_divide
v = np.divide(b, KtransposeU)
/usr/local/lib/python3.7/dist-packages/ot/bregman.py:363: RuntimeWarning: overflow encountered in true_divide
v = np.divide(b, KtransposeU)

A "fix" around is initializing with a higher value (5e-3).
A more elaborate change can be done in the normalization of the two objectives (the GW term and the atlas term) ensuring both are in the same order of magnitude.

Reproducing the error can be done over the Drosophila data ('reconstruct_drosophila_embryo_tutorial.ipynb') running "Reconstruct the tissue with marker genes" with epsilon = 5e-4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant