Can we build a set out of each respective nodes, connecting nodes of which as set's elements. then if we can draw the venn diagrams too. Thanks.

I have already checked detection based on Jaccard similarity but not satisfied.

# Set building from a graph

**nitish**(Nitish) #1

**nitish**(Nitish) #3

sure, referring to the graph my doubt is if i can make mathematical set as set of central node. and all 18 connected nodes as its elements.!

**andrew.bowman**(Andrew Bowman) #4

We can collect its connected nodes as a list, if that's what you mean:

```
MATCH (n:Node)-[:PARAMETER]->(x)
WHERE n.id = 12345
RETURN n, collect(x) as parameterNodes
```

From there you can do filtering or parameter extraction from that list.

If you have APOC Procedures then you can use a variety of collection functions, such as union, intersection, subtraction, toSet (to ensure distinct elements) and more.

As for visualizing these with Venn diagrams, we don't support that with the visualizer in the browser. You may want to google around to see if anyone else has implemented a visualizer which produces these diagrams, but I haven't personally looked around for these.