liveBook · Manning

Target node

As explained in Graph Algorithms for Data Science

A target node is the ending node of a directed relationship in Neo4j Graph Data Science terminology.

A target node is the ending node of a directed relationship. Its counterpart is the source node, where the relationship begins. In Neo4j Graph Data Science, both nodes help define relationships loaded into an in-memory graph. section 5.2.1

Cypher projection identifies source and target nodes with a pattern such as MATCH (sourceNode)-[relationship]->(targetNode), then passes them to gds.graph.project. This can project existing relationships or define virtual connections while filtering or transforming the projected graph. section 6.1.1

Projecting retweet relationships

MATCH (source:User)-[:PUBLISH]->()-[:RETWEETS]->()<-[:PUBLISH]-(target:User) identifies users as source and target nodes. The query then projects source and target with a weight property, creating the named amplify graph. section 6.1.1

Listing 6.2 Cypher projection syntax
MATCH (sourceNode)-[relationship]->(targetNode)  #1
RETURN gds.graph.project(
   'graph',                                      #2
   sourceNode,                                   #3
   targetNode,                                   #4
   {dataConfig},                                 #5
   {configuration}                               #6
) YIELD
    graphName,
    nodeCount,
    relationshipCount

Use the syntax listing to trace how a directed relationship's sourceNode and targetNode become arguments to gds.graph.project. section 6.1.1

How Graph Algorithms for Data Science covers it

How deep it goes
Explains the term and demonstrates its use in Cypher projection, without detailing algorithm internals.
Examples
Illustrates target nodes through follower projection syntax and a weighted amplify retweet network.
What you can do after
Apply it via Neo4j Graph Data Science to specify relationship endpoints in projected graphs.
How it connects
Connects target nodes with source nodes, directed relationships, Cypher projection, native projection, and in-memory graphs.

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.