liveBook · Manning

Community

As explained in Graph Algorithms for Data Science

Community structure is the organization of a graph into groups of nodes with comparatively dense internal connections.

A community is a densely interconnected group of nodes whose members have comparatively fewer connections to other groups. In a social graph, it resembles a friend group: people in the group connect often, while an occasional outside connection does not merge two groups into one community. section 1.1 section 5.1

Figure 5.3 Friendship network with nodes with outlined communities
05-03

Outlined groups make the distinction visible: Frodo, Samwise, and Jack form a community because they are mutually connected, while Jack’s tie to Ganesh alone is not enough to include Ganesh. section 5.1

Community detection, also called clustering, assigns graph structure to interpretable groups. It can reveal multiple groups in a central network and distinguish isolated, disconnected nodes from the main graph. The resulting groups can support content or friendship recommendations, marketing segmentation, and network characterization. section 1.1 section 5.1

Finding hashtag groups

For hashtag analysis, first turn tweet–hashtag data into a hashtag co-occurrence network: match two tags attached to the same tweet and create a CO_OCCURRENCE relationship. Then use label propagation to evaluate its community structure, identifying groups of related tags for a hashtag-targeting task. section 7.0

Listing 7.1 Describing the construction of a hashtag co-occurrence network with a Cypher statement
MATCH (s:Tag)<-[:HAS_TAG]-(:Tweet)-[:HAS_TAG]->(t:Tag)
CREATE (s)-[:CO_OCCURRENCE]->(t);

This Cypher pattern connects tags that occur on the same tweet, producing a monopartite network suitable for subsequent graph analysis. section 7.0

How Graph Algorithms for Data Science covers it

How deep it goes
Defines communities through connection density and demonstrates detection on social and hashtag co-occurrence networks without detailing algorithm internals.
Examples
Uses social-platform users, an eight-person friendship network, and tweet hashtags transformed into a co-occurrence network.
What it assumes
Introduces communities through familiar friendship connections and requires no prior graph-theory expertise in the presented examples.
What you can do after
Apply it via Neo4j Graph Data Science algorithms to identify tightly connected groups and interpret them for analysis or targeting.
How it connects
Connects community detection with clustering, centrality, bipartite networks, co-occurrence networks, label propagation, PageRank, and Jaccard similarity.

Also explained in

Compare how 4 books explain community →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Graph Algorithms for Data Science. The section links point to the parts of the book it draws on.