wot icon indicating copy to clipboard operation
wot copied to clipboard

Overflow warnings

Open ShouWenWang opened this issue 3 years ago • 5 comments

Hi, I often get a warning message while using the duality_gap method in WOT: 'Overflow encountered in duality gap computation, please report this incident'. Do you have any idea how this occurs, and how to resolve this? Thanks!

Specifically, this occurs for the function optimal_transport_duality_gap, located at https://github.com/broadinstitute/wot/blob/master/wot/ot/optimal_transport.py

ShouWenWang avatar Apr 11 '21 21:04 ShouWenWang

Hello,

I've been having this problem with a particular dataset too. Can I ask what reasons you think might be causing it in your data? And have you resolved it yet?

Alexgr97 avatar May 14 '21 20:05 Alexgr97

I think it might be that some distances are very large or small. I have not solved this problem yet.

ShouWenWang avatar May 15 '21 04:05 ShouWenWang

My growth rate was derived from actual experimental data. Whereas their minimal growth value was around 0.24, mine had some that were a few orders lower, around 0.1 etc. I found that playing around with the iterations, batch sizes, epsilon and lambdas helped resolve it for me, but only as I already had fair confidence in my growth rates. Hope this helps!

Alexgr97 avatar May 17 '21 14:05 Alexgr97

*I should add I explored what was happening and in calculating the duality gap, I was ending up with new iterations too close to zero, that were then ending up making certain values shoot to inf, and then blew everything in subsequent calculations to nans. Their source is well documented, so it's nice code to instrument to find out if this is happening for you too.

Alexgr97 avatar May 17 '21 14:05 Alexgr97

We've also encountered this problem in our data. The only solution we found so far, is to exclude 'outlier' cells. We have noticed that there is a small subset of cells with extremely large distances to the rest of the dataset, after excluding them the model ran fine.

Iwo-K avatar Nov 01 '21 17:11 Iwo-K