Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-28-2020 09:37 AM
In order to set some team targets I want a simple metric (comprehensible to stakeholders unfamiliar with graph tech) that measures the connectedness of my graph.
My first sweep has the following query
MATCH (a)
WITH count(a) AS allrecords
MATCH (b)
WHERE ((b)-[]->())
RETURN count(b) * 100.0 / allrecords
This measures the proportion of nodes that have an outgoing relationship. Not a bad start but has 2 failings:
I have come up with the following:
MATCH (b)-[]-(c)
WHERE labels(b)[0] <> labels(c)[0]
WITH DISTINCT b
WITH count(b) as connected
MATCH (a)
RETURN connected * 100.0 / count(a)
Which aims to get all records connected to at least one record not of the same label in any direction ( all nodes in my graph only have a single label )
Does this look right? I'm getting 62% as the value, whereas my first query got 35%. Intuitively, 35% feels more like what I'd expect
All the sessions of the conference are now available online