Is there a Filtered Node Similarity Example example that i can reference? I am having difficulty configuring node filters for a bipartite projection. From what i can find, Neo4j current documentation does not include an example and truncates some of the syntax for TargetNodeFilters and SourceNodeFilters. For one of my labels, I have projected a numerical vector that resulted from one-hot encoding. For this label, i want to filter the nodes as input to the similarity algorithm using a node filter on that numerical vector. For example:
MATCH (p:Person) where p.vector[0] = 1 AS people
sourceNodeFilter: people
In the node similarity call, where do the above cypher "fit" in the call? Here is what is currently not working...
I have changed the similarity call
from: CALL gds.nodeSimilarity.stream()
to: CALL gds.alpha.nodeSimilarity.filtered.stream()
and still not sure if call is working correctly
Additonal question about how to use "sourceNodeFilter"
Relating this topic, I am struggling with the appropriate use of Cypher relating to Filtered Node Similarity Algo.
I would appreciate if someone would teach me how to use “sourceNodeFilter” (or “targetNodeFileter” ) of Filtered Node Similarity algo.
I want to use the following option for “sourceNodeFilter” (or “targetNodeFilter”)
-------------------------
a list of nodes
MATCH (person:Person) WHERE person.age > 35 collect(person) AS people … sourceNodeFilter: people
-------------------------
However I do not understand how I should exactly write the above in the query sentence. Could someone give me an example?
My query which is not working is like this:
-------------------------
CALL gds.alpha.nodeSimilarity.filtered.stream('myGraph',
{ MATCH (person:Person) WHERE person.age = 35 collect(person) AS people, sourceNodeFilter:people,
topN:3
})