liveBook · Manning

Native projection

As explained in Graph Algorithms for Data Science

Native projection is a graph projection technique that selects nodes and relationships from Neo4j storage using node labels and relationship types without applying custom transformations during loading.

Native projection creates an optimized in-memory graph for Neo4j Graph Data Science algorithms by reading directly from Neo4j storage. It selects nodes by labels and relationships by types, making it performant but less flexible than Cypher projection. section 5.2

Use CALL gds.graph.project() to store a named graph in the graph catalog. The graph name identifies the projection for later algorithm executions, while nodeProjection and relationshipProjection define its contents. section 5.2.1

Projecting a follower network

CALL gds.graph.project('follower-network', 'User', 'FOLLOWS') creates an in-memory graph containing User nodes and FOLLOWS relationships. A relationship is skipped when both of its adjacent nodes are absent from the node projection. section 5.2.1

Native projection is useful when:

  • You need a high-performance projection for graph algorithm execution. section 5.2
  • Labels and relationship types provide sufficient filtering. section 5.2
  • You can materialize a transformed network in Neo4j before loading it, because native projection does not transform networks during loading. section 6.1
Figure 5.8 Graph Data Science library workflow
05-08

Use the workflow figure to connect stored graph data, in-memory projection, and subsequent GDS algorithm execution. section 5.2

How Graph Algorithms for Data Science covers it

How deep it goes
Explains projection parameters, relationship eligibility, performance, and transformation limits, but defers advanced multi-label and property configuration.
Examples
Demonstrates a follower network containing User nodes and FOLLOWS relationships.
What it assumes
Assumes basic Neo4j labels, relationship types, Cypher CALL syntax, and graph algorithm terminology.
What you can do after
Operate/configure named in-memory graphs with gds.graph.project() for later algorithm execution.
How it connects
Connects projected in-memory graphs with graph catalogs, graph algorithms, and Cypher projection.

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.