Below is the example in Neo4j algorithm book.
What are other choices for the relationship orientation?
What does undirected mean?
My relationships are directed. I changed the orientation to directed but it says it is not an option.
Thanks in advance.
CALL gds.localClusteringCoefficient.stream({
nodeProjection: "Library",
relationshipProjection: {
DEPENDS_ON: {
type: "DEPENDS_ON",
orientation: "UNDIRECTED"
}
}
})
YIELD nodeId, localClusteringCoefficient
WHERE localClusteringCoefficient > 0
RETURN gds.util.asNode(nodeId).id AS library, localClusteringCoefficient
However, sometimes it's useful to think about the relationship in both directions, and we don't really care which way it actually runs. For example, if David knows Ben, probably Ben knows David, and so direction doesn't really matter. In this sense, using some of the algorithms we can treat that "KNOWS" relationship as undirected and kinda work with it as if it runs both ways.
When an algorithm says that it's undirected, that means it doesn't use the direction information at all. Meaning that if you ran the algorithm twice, once on your graph, and once on the same graph with all of the relationships pointing the opposite way, you'd probably get the same thing.