Closed risufaj closed 1 year ago
Having examined the code, the personalization vector is taken from the graph stored in Memgraph as follows:
nxalg.pagerank
, e.g. CALL nxalg.pagerank(0.85, "personalizationProperty") YIELD *
The rationale behind this is that, if you have a large graph, calling nxalg.pagerank
this way is much more convenient than passing an enormous dictionary with one item per each node.
Thanks for the answer! I'll close this.
Hello,
I'm attempting to write a query that also calculates personalized pagerank. However, I can't figure out how to add the personalisation vector to the call. The issue is that in nxalg, it is not clear how the personalisation vector is supposed to be represented. Here: https://github.com/memgraph/mage/blob/main/python/nxalg.py#L489 personalisation is supposed to be a string, which is then converted to a dictionary (as far as I understand). Are there any examples of how the string should look? Is it a string representation of a dictionary? if so, what should the keys be: nodes, or node ids?
Thank you in advance