facebookresearch / PoincareMaps

The need to understand cell developmental processes has spawned a plethora of computational methods for discovering hierarchies from scRNAseq data. However, existing techniques are based on Euclidean geometry which is not an optimal choice for modeling complex cell trajectories with multiple branches. To overcome this fundamental representation issue we propose Poincaré maps, a method harnessing the power of hyperbolic geometry into the realm of single-cell data analysis.
Other
148 stars 31 forks source link

IndexError: index 0 is out of bounds for axis 0 with size 0 #1

Closed droplet-lab closed 4 years ago

droplet-lab commented 4 years ago

Hello,

I am trying out your tool but am running into the same error, randomly after >400 epochs. Would you let me know if you have an idea what s going on?

Thanks a lot, Jo

python3 main.py --dset data --path data/ --batchsize -1 --cuda 0 --knn 15 --gamma 2.0 --sigma 1.0 --pca 20 --labels 1 --mode features --debugplot 10 Computing laplacian... Laplacian computed in 0.01 sec Computing RFA... RFA computed in 0.00 sec batchsize = 20 Starting training... loss: 0.29734: 10%|██▍ | 476/5000 [00:32<04:57, 15.20it/s] Stopped at epoch 480 PM computed in 32.75 sec loss = 2.973e-01 time = 0.548 min Traceback (most recent call last): File "main.py", line 207, in root_hat = poincare_root(opt, labels, features)
File "/path/model.py", line 40, in poincare_root return head_idx[0] IndexError: index 0 is out of bounds for axis 0 with size 0 loss: 0.29734: 10%|██▍ | 476/5000 [00:33<05:16, 14.31it/s]

klanita commented 4 years ago

Hi, Jo! Thank you very much for your comment! This was happening, because the root node for the rotation was not found in the labels. I added this case for the code now. If you know with respect to which node you want to rotate the disk (to place this node in the center), you can --root root_node_name. The root_node_name should be present in labels.

Closed issue with commit 07d3049564a294d5a9471d1a7470bd57c46a08b9