Skip to content

v0.1.2-alpha

Pre-release
Pre-release

Choose a tag to compare

@FrInve FrInve released this 18 Mar 14:56
· 23 commits to feature_querytree_strategy since this release

v0.1.2-alpha

This version is for experimental use only and it is not intended for production use.
This software does not represent the behaviour and the characteristics of the final product, since it is an early development stage.

Available features:

Association rule mining with many patterns in the body or in the head.
This includes both cardinality ranges for single patterns and AND clauses in each patternSet.
Patterns can be constructed by tails of multiple fragments of type Normal.

Installation guide

  • Stop Neo4j.
  • Place the .jar binary in the /plugin directory of your Neo4j installation.
  • Restart the server.

Procedure's Parameters

The proceduer apoc.mgr.mineGraphRule takes as parameter seven elements:

- anchor
- anchorLabel
- anchor's WHERE clause
- serialized Head structure
- serialized Body structure
- support
- confidence

Example

The following rule that uses all the available features

MINE GRAPH RULE SimpleAssociationRules
GROUPING ON (person:Person)
DEFINING body AS 1...2 (person)-[:Buy]-(b:Item) AND 1...2 (person)-[:Follow]-(f:Person)
                 head AS 1...1 (person)-[:Buy]-(h:Item)-[:Of]-(c:Category)
EXTRACTING RULES WITH SUPPORT: 0.2, CONFIDENCE: 0.6

can be expressed with the following data CALL expression, which still uses the serialized version of the language:

CALL apoc.mgr.mineGraphRule("person", "Person","", 
[{numMin:1, numMax:1, patternTail:[{type: "normal", relationshipType: "Buy", nodeLabel: "Item", nodeVariable:"h"},
                                                {type: "normal", relationshipType: "Of", nodeLabel: "Category", nodeVariable:"c"}]}],
[{numMin:1, numMax:2, patternTail:[{type: "normal", relationshipType: "Buy", nodeLabel: "Item", nodeVariable:"b"}]},
    {numMin:1, numMax:2, patternTail:[{type: "normal", relationshipType: "Follow", nodeLabel: "Person", nodeVariable:"f"}]}],
0.2, 0.6)