You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
After running a random walk algorithm like gds.graph.sample.rwr, I want to get which relationships are visited. The following is an example to clarify what I want.
In this example, there are multiple relations with the same type between two nodes, e.g. PAYS between Alice and InstrumentSeller. I want to know which relationships (identified with relationship ID) are sampled in this sampling process. However, the current provided methods can only figure out which type of relations are sampled, instead of exact relationship IDs.
Describe the solution you would like
Current relationship operations like gds.beta.graph.relationships and gds.graph.relationshipProperties allow us to visit the relationship types and properties in a projection, however, the original relationship IDs are not allowed to visit. I know there are some scenarios in which relationship IDs cannot be provided (e.g., new relationships created in a projection), but can we provide relationship IDs that existed in the original neo4j graph?
The text was updated successfully, but these errors were encountered:
I just want to confirm that this feature does not exist currently, but we are happy to receive your request.
The best that I can offer you is to manage the disambiguation yourself, by projecting your own key via the relationship projection.
To exemplify what I mean using your example, you could do the following projection:
MATCH (source)
OPTIONAL MATCH (source)-[r]->(target)
WITH gds.graph.project(
'graph_0',
source,
target,
{
sourceNodeLabels: labels(source),
targetNodeLabels: labels(target),
relationshipType: type(r),
relationshipProperties: {key: id(r)}
}
) AS g
RETURN g.graphName AS graph, g.nodeCount AS nodes, g.relationshipCount AS rels
Then your graph.sample projection should also include these keys, allowing you to disambiguate them towards the original relationships.
I hope this helps in lieu of your actual request being supported!
All the best
Mats
Is your feature request related to a problem? Please describe.
After running a random walk algorithm like
gds.graph.sample.rwr
, I want to get which relationships are visited. The following is an example to clarify what I want.Alice
andInstrumentSeller
. I want to know which relationships (identified with relationship ID) are sampled in this sampling process. However, the current provided methods can only figure out which type of relations are sampled, instead of exact relationship IDs.Describe the solution you would like
Current relationship operations like
gds.beta.graph.relationships
andgds.graph.relationshipProperties
allow us to visit the relationship types and properties in a projection, however, the original relationship IDs are not allowed to visit. I know there are some scenarios in which relationship IDs cannot be provided (e.g., new relationships created in a projection), but can we provide relationship IDs that existed in the original neo4j graph?The text was updated successfully, but these errors were encountered: