如何使用gds.version()1.7.2创建neo4J多画像?
我想投射一个包含多个节点和关系类型的子图。在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.create.cypher
,但是节点Edge选择仅列出列表。谁能建议该怎么做?
I want to project a subgraph that contains multiple nodes and relationship types. In gds 2.0 there is this (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
I want to do something similar, using gds 1.7.2 gds.graph.create.cypher
, but the node and edge selection only take strings not lists. Can anyone suggest how to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您正在寻找
gds.graph.create
过程( doc ),这是GDS先前版本中project
等效的:这就是所谓的“本地投影”,与您提到的
.cypher
过程执行的“ Cypher投影”相反,该过程期望Cypher查询作为参数,因此是字符串。I think you are looking for the
gds.graph.create
procedure (doc), which is the equivalent ofproject
in previous versions of GDS:This is the so called "native projection", as opposed to "Cypher projection" which is performed by the
.cypher
procedure you mention, which expect a Cypher query as parameter, hence the string.