I would like to apply label propagation to my data in Neo4j with seed labels and weight property. My data looks like the image.
The relationship 'Appears_in' has the weight property (integers like 8 in the image) and some articles nodes has seed label property (strings, for example Iphone).
I would like to propagate this seed labels to create clusters with the articles that speaks about the same topic, for example Iphone cluster. More precisely I would like to propagate seed label to another article node but articles do not have a direct relationship between them. They are 'somewhere' connected through the words that they have in commun...
Firstly, I ran weakly connected component in order to keep the only one big network I have in my data :
So I tried to kept the network with 2170 nodes and I projected a bipartite graph to a monopartite with the cypher projection. In the next step, I ran the Label Propagation algorithm. Here is the code :
The results are not good.
I would like to give seed labels (strings) and the weights (that are in the relationships) to the Label Propagation Algorithm.
I would like to have few clusters (I guess 5 clusters if I have 5 seed labels (strings))
I have 5 nodes with seed labels (strings) and I would like to propagate these seed labels throught the network.
For example : The 5 seed labels (strings) would be 'Iphone', 'Coronavirus', 'Disney', 'Crisis', 'Summer'.
How can I write the Label Propagation to propagate these seed labels (strings) ?