Union-Find
The algorithm underlying Weakly Connected Components. It holds each node in a set, and merges two sets whenever a relationship joins them.
Example
Four people, and two relationships read one after the other.
Each person starts in a set of their own, four sets in all. Reading the relationship between Ava and Ben merges their two sets into one. Reading the relationship between Cleo and Dan merges theirs. Nothing joins one pair to the other, so two sets are left.
cypher
CALL gds.wcc.stream('people')
YIELD nodeId, componentId
RETURN gds.util.asNode(nodeId).name AS person, componentIdAva and Ben come back with one componentId, Cleo and Dan with another.
Lessons that use this term
The lesson and course links below open in a new tab.
One lesson uses this term.
Graph Data Science in Practice3 mentions
- Degree Centrality & WCCCommunity Detection for Frauddegree centrality with different orientations and weights Explain the Union-Find algorithm underlying WCC Configure WCC with thresholds, seeding, and performance optimizations Choose between3 mentions