Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
06-04-2020 08:03 AM
Hello,
I try to run Label Propagation with my data in Neo4j.
I have two types of nodes : "Articles" and "Keyword"
I have one relationship that link nodes keyword with nodes articles : "Appears_in"
Some articles has labels (string labels) and I don't know how to put this labels in seed labels.
I also don't know how to call LPA with two types of nodes.
Can you help me ?
Thank you
06-05-2020 07:01 AM
Can you share your code? And those seed labels will need to be numeric values as far as I'm aware, so you might need to translate the string values to numbers.
Once you've done that you need to specify the seedProperty
before you call the algorithm - https://neo4j.com/docs/graph-data-science/current/algorithms/label-propagation/#algorithms-label-pro...
06-05-2020 07:08 AM
This is what I have in my database. But I don't know how to code it to call the Label Propagation Algorithm. I think I need to call the LPA in my Jupyter Notebook in order to translate the string values to numbers and then put them in seed property.
I need to call the LPA with seed labels, weight property in the relationship and two types of nodes.
06-05-2020 07:10 AM
Have you already installed the Graph Data Science Library? You can find installation instructions here - https://neo4j.com/docs/graph-data-science/current/installation/
Once you've done that you can run this query:
call gds.list("")
and you should see a list of the available procedures.
Label Propagation documentation is here: https://neo4j.com/docs/graph-data-science/current/algorithms/label-propagation/?&_ga=2.103276736.158...
06-05-2020 07:14 AM
Yes I already installed the GDS library. Thank you very much for your answer. Do you know if it is possible to call algorithms from Neo4j in a jupyter notebook ?
06-05-2020 07:17 AM
Yes - you can either do that by using the Neo4j Python driver and execute GDS queries using that...or yo could use a library like pygds - https://github.com/stellasia/pygds
06-05-2020 07:18 AM
Thank you very much, I'm going to try it
All the sessions of the conference are now available online