简体   繁体   中英

Neo4j: How to display communities after applying Label Propagation Algorithm (LPA)

I have 565 articles in Neo4j and I ran LPA to obtain clusters.

I have the following result: 69 communities.

I would like to display all the communities at the same time in Neo4j.

I tried several Cypher queries with the property key 'community' but it didn't work.

My data looks like this:

在此处输入图像描述

How can I do it?

Presumably, you are using the neo4j Browser to visualize your results.

When your Cypher query returns any nodes, relationships, or paths , the browser will automatically show you the Graph view (on the left side of the result panel, you should see icons with captions that may include Graph , Table , Text , etc.). The Graph view only shows nodes and relationships, and not anything else that was returned.

However, if you click on the other icons (say, Table or Text ), you should see more results -- like the communities, presented in different formats.

By the way, specifying the node label would make your query more efficient (and adding an index would make it even more efficient if you have a lot of ARTICLE nodes):

MATCH (n:ARTICLE) WHERE EXISTS(n.community)
RETURN n, n.community

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM