如何使用 gds.version() 1.7.2 创建 Neo4J 多图?
How do I create a Neo4J multi-graph using gds.version() 1.7.2?
我想投影一个包含多个节点和关系类型的子图。在 gds 2.0 中有这个 (https://neo4j.com/docs/graph-data-science/current/graph-project/):
CALL gds.graph.project(
'personsAndBooks',
['Person', 'Book'],
['KNOWS', 'READ']
)
YIELD
graphName AS graph, nodeProjection, nodeCount AS nodes, relationshipCount AS rels
我想做类似的事情,使用 gds 1.7.2 gds.graph.create.cypher
,但是节点和边的选择只接受字符串而不是列表。谁能建议如何做到这一点?
我认为您正在寻找 gds.graph.create
程序 (doc),它相当于 GDS 以前版本中的 project
:
CALL gds.graph.create(
'personsAndBooks',
['Person', 'Book'],
['KNOWS', 'READ']
)
YIELD
graphName AS graph, nodeProjection, nodeCount AS nodes, relationshipCount AS rels
这就是所谓的“本机投影”,与您提到的 .cypher
过程执行的“Cypher 投影”相反,它期望 Cypher 查询作为参数,因此是字符串。
我想投影一个包含多个节点和关系类型的子图。在 gds 2.0 中有这个 (https://neo4j.com/docs/graph-data-science/current/graph-project/):
CALL gds.graph.project(
'personsAndBooks',
['Person', 'Book'],
['KNOWS', 'READ']
)
YIELD
graphName AS graph, nodeProjection, nodeCount AS nodes, relationshipCount AS rels
我想做类似的事情,使用 gds 1.7.2 gds.graph.create.cypher
,但是节点和边的选择只接受字符串而不是列表。谁能建议如何做到这一点?
我认为您正在寻找 gds.graph.create
程序 (doc),它相当于 GDS 以前版本中的 project
:
CALL gds.graph.create(
'personsAndBooks',
['Person', 'Book'],
['KNOWS', 'READ']
)
YIELD
graphName AS graph, nodeProjection, nodeCount AS nodes, relationshipCount AS rels
这就是所谓的“本机投影”,与您提到的 .cypher
过程执行的“Cypher 投影”相反,它期望 Cypher 查询作为参数,因此是字符串。