Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-16-2022 01:34 PM
I need to implement a custom propagation algorithm that starts from a given node and visits its neighbors and update their properties accordingly based on the previous node properties.
Example use case is, a quality flag that changed in a given node from good to bad and I need to make all the subsequent nodes become bad.
What is the recommend way of implement this efficiently in python? (I'm trying to avoid to have client code to have this graph traversal one hop at a time)
05-16-2022 04:58 PM
This would be fairly simple in a custom procedure. You would then use the python driver to match the root node and call the procedure to update the graph starting at the root node.
05-17-2022 06:16 AM
Have you looked at our Pregel API? It's purpose built to allow folks to implement their own algorithm, using all the infrastructure of GDS: Pregel API - Neo4j Graph Data Science
05-17-2022 09:55 AM
@alicia.frame1 yeah I saw Pregel and it seemed more appropriate, can you point to examples using this API? Also it has no python API, or maybe I could just use it in cypher?
05-17-2022 10:48 AM
there are examples of algorithms implemented in Pregel here: graph-data-science/examples/pregel-example at master · neo4j/graph-data-science · GitHub
Pregel is Java based; there's no python API.
For your use case I think you could just use LPA, right out of the box: Label Propagation - Neo4j Graph Data Science
05-17-2022 10:57 AM
@alicia.frame1 LP was the first thing I looked into, I think it is same idea but I don't think I can use it as is, will try though, thanks.
All the sessions of the conference are now available online