mberr / torch-ppr

(Personalized) Page-Rank computation using PyTorch
MIT License
86 stars 5 forks source link

Incorporating edge weights #22

Closed Filco306 closed 1 year ago

Filco306 commented 1 year ago

Hello,

Thank you for this great repository; it is a great, handy package that performs very well! I was wondering however; is it possible to incorporate edge weights into the personalized pagerank method?

Best Filip

Filco306 commented 1 year ago

Oh, I found now that one can pass adj where rows sum to 1; I assume those are edge weights, if this is not true please correct me, otherwise, I will close this now :)

cthoyt commented 1 year ago

@Filco306 It would be great if you could contribute a small example about what you're doing so we could include it in the documentation. Thanks for your interest!

Filco306 commented 1 year ago

Sure! I'll file a PR :)

cthoyt commented 1 year ago

that's great! The best place to put a new example would be inside the docstring for the PPR function itself all the way at the bottom, just before this: https://github.com/mberr/torch-ppr/blob/a5de68835cd4dd879b386f0f28bfe6297feb6262/src/torch_ppr/api.py#L138

Filco306 commented 1 year ago

Oh, I just put the example in the README now (see #23). Can add there as well though!