Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
10-28-2019 01:37 AM
Is it possible to apply graph algorithms on a network which has more than one node type and links in the network?
10-28-2019 06:48 AM
Hi,
Yes you can. See this part of the documentation for an explanation of that - https://neo4j.com/docs/graph-algorithms/current/projected-graph-model/named-graph/#_loading_multiple...
Cheers, Mark
10-29-2019 03:52 PM
Dear Mark,
Thanks for that. I have had the opportunity to read your book on Graph Algorithms in Neo4J and Apache Spark. It has been of great help.
I asked the question because the attached below is the database schema for my dataset. Using the Graph Algorithm Playground App in Neo4J, I have been able to apply the measures such as Jaccard Similarity Index and coefficient clustering coefficients. Post that, I have applied centrality measures to compute node influence. I have made a note of the codes generated on using each of the methods.
So I am not sure if I am correct or not because the literature is just talking about networks with one kind of node and relationship. I was wondering if my analysis is correct or not. Any help or guidance would be much appreciated.
Maybe the use of graph database platforms allows me to do it?
10-31-2019 02:23 PM
Is there any mistake in using a schema with different node types and relationships and applying the graph algorithms on such a network?
12-09-2019 08:27 AM
The majority of our algorithms are intended for monopartite (meaning one node, one relationship type) graphs. You can use Cypher Projections to get the algorithms to run, but if you're combining node/relationship types the results may not be very informative. Instead, you want to use the cypher projection features to create a monopartite projection.
For example, you might want to try something like
CALL algo.pageRank( 'MATCH (c:Company) RETURN id(c) as id', 'MATCH (c1:Page)-[r1]->(p)<-[r2]-(c2:Company) RETURN id(p1) as source, id(p2) as target, count(o) as weight', {graph:'cypher', weightProperty:'weight', write: true} )
All the sessions of the conference are now available online