Open
Conversation
…_tail_merging: bool) The relation_tail_merging mode applied the relation-tail merging method, as introduces in our new paper.
…is very useful for exploring and debugging our processed graph)
…skip_literals: bool).
If True, literals (=node properties/attributes) are skipped during the conversion.
Otherwise, they are converted to nodes. so that a node (n: {name: 'John'}) becomes (n)-->(name)-->(john).
…rate_candidates(): during walk candidate collection, only even walking depths (2, 4, 6...) where collected. But if we process an relation-tail merged graph, we also need to consider odd walking depths!
Collaborator
Author
|
Short update: Just a friendly reminder to process this pull request. I think the made changes of this branch are save to merge, because i made some tests with relation-tail merging (rtm) and without. As we can see, MUTAG seems to benefit from rtm, the other datasets not that much... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Hi,
I added a new method to convert a multi-relational rdf-graph file into a non-relational graph of type
datastructures::Graph, called "relation-tail merging".It can be used by calling the
datastructures::Graph::rdflib_to_graph()method with the new input-parameterrelation_tail_merging=True.The process of relation-tail merging tries to solve the issue that predicate-nodes often carry little to no information (which is why these candidates are usually skipped during walk mining).
Relation_tail_merging works as follows (is also explained in our corresponding paper, which is currently under review):
First, the next tail node is selected, t, as well as a set of nr relations of identical type, r, where the topological form ()-r->(t) is given. The process of relation-tail merging then involves inserting a new node, rt, so that ()-r->(t) turns into (*)-->(rt)-->(t). The new directional edges, -->, are now typeless, and the new inserted node, rt, represents a "relation-modified" node and is named accordingly in the form <type_of_r>_<name_of_t>.
To implement this method, i changed the
datastructures::Graph::rdflib_to_graph()method accordingly and i also applied a small change to the functionMINDWALCMixin::_generate_candidates(), so that, if we use a relation-tail merged graph, MINDWALC does also collect walks with odd depths, so that also (rt) nodes are considered during candidate collection.I also added a mew function to the datastructures::Graph class, called graph_to_neo4j(). This method can load a given datastructures::Graph instance into a running and empty neo4j database. This can be useful to investigate our graph using the neo4j desktop app.