Open jinga-lala opened 3 years ago
Currently no. I think one can implement it via alias sampling.
Are you referring to this function? https://github.com/rusty1s/pytorch_cluster/blob/4764b48be5f18ad9b20683571c70d8fa690abae2/torch_cluster/rw.py#L8
If yes, I am sorry but I don't understand this function because it seems you are returning the same function again. If possible can you write the exact code snippet? Any help would be appreciated.
torch.ops.torch_cluster.random_walk
calls the underlying CPU/CUDA implementation in csrc/cpu/rw_cpu.cpp
and csrc/cuda/rw_cuda.cu
. These implementations cannot currently handle custom transition probabilities.
Thanks for your reply. Can you please write a wrapper over this function to handle transition probabilities, probably using alias sampling as you mentioned earlier?
I see what I can do :)
This would be an extremely useful feature... As of now it's kinda tricky to do weighted random walks for e.g. node embeddings :/
Is there any way to call random_walk function with custom transition probabilities?