Hey, everyone. I'm trying to prototype/test some algorithms for some custom recommendation systems, but my graph isn't as simple as the examples here: Centrality - Neo4j Graph Data Science
My graph has a bunch of startups (with specific categories) and funding data (funding rounds, each with 1-n investor nodes). So something like this:
(Category)-[:]-(Company)-[:]-(FundingRound)-[:]-(Investor)
My goal:
What I'd like to do is given a set of categories/characteristics, recommend a list of investors.
It feels like I should be able to specify a subgraph (leading from a specific set of categories through to the investors) and then run some sort of PageRank or Centrality algorithm on that, but I feel I'm getting stuck on a combination of theory and execution.
Here's a sample approach:
CALL algo.pageRank.stream(
'MATCH (cat:Category {name:"artificial-intelligence"})<-[]-(c:Company)<-[]-(f:FundingRound)<-[]-(inv:Investor) RETURN inv',
{graph:'cypher'}
)
YIELD node,score with node,score order by score desc limit 20
This is a particularly simple example - I plan to expand this to include multiple categories once I figure out if/how I can do this.
But I'm currently getting this error:
Neo.ClientError.Statement.SyntaxError: Type mismatch: expected String but was Map (line 3, column 3 (offset: 163))
" {graph:'cypher'}"
(with a caret under the "c" in "cypher")
So I guess I have two questions:
- Am I on the right track with my overall approach, or have I totally missed the plot?
- Are there obvious syntax errors I'm missing, or something in the execution I don't understand?
I'd really appreciate any/all help!