| Package | Description |
|---|---|
| amie.mining | |
| amie.mining.assistant | |
| amie.rules |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<Rule> |
AMIE.mine()
The key method which returns a set of rules mined from the KB based on
the AMIE object's configuration.
|
| Modifier and Type | Method and Description |
|---|---|
protected Rule |
DefaultMiningAssistant.rewriteProjectionQuery(Rule query,
int bindingTriplePos,
int bindingVarPos)
It identifies redundant patterns in queries and rewrites them accordingly
so that they become less expensive to evaluate.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
MiningAssistant.calculateConfidenceApproximationFor3Atoms(Rule candidate)
Calculate the confidence approximation of the query for the case when the rule has exactly 3 atoms.
|
protected boolean |
MiningAssistant.calculateConfidenceApproximationForGeneralCase(Rule candidate)
Given a rule with more than 3 atoms and a single path connecting the head variables,
it computes a confidence approximation.
|
boolean |
MiningAssistant.calculateConfidenceBoundsAndApproximations(Rule candidate)
It computes the confidence upper bounds and approximations for the rule sent as argument.
|
void |
DefaultMiningAssistant.calculateConfidenceMetrics(Rule candidate) |
void |
MiningAssistant.calculateConfidenceMetrics(Rule candidate)
It computes the standard and the PCA confidence of a given rule.
|
protected long |
DefaultMiningAssistant.computeBodySize(javatools.datatypes.ByteString var1,
javatools.datatypes.ByteString var2,
Rule query)
Returns the number of distinct bindings of the given variables in the body of the rule.
|
double |
DefaultMiningAssistant.computeCardinality(Rule rule) |
double |
MiningAssistant.computeCardinality(Rule rule)
It computes the number of positive examples (cardinality) of the given rule
based on the evidence in the database.
|
protected double |
DefaultMiningAssistant.computePcaBodySize(javatools.datatypes.ByteString var1,
javatools.datatypes.ByteString var2,
Rule query,
java.util.List<javatools.datatypes.ByteString[]> antecedent,
javatools.datatypes.ByteString[] existentialTriple,
int nonExistentialPosition)
Returns the denominator of the PCA confidence expression for the antecedent of a rule.
|
double |
DefaultMiningAssistant.computePCAConfidence(Rule rule) |
double |
MiningAssistant.computePCAConfidence(Rule rule)
It computes the PCA confidence of the given rule based on the evidence in database.
|
double |
DefaultMiningAssistant.computeStandardConfidence(Rule candidate) |
double |
MiningAssistant.computeStandardConfidence(Rule candidate)
It computes the standard confidence of the given rule based on the evidence in database.
|
protected boolean |
DefaultMiningAssistant.containsHardCase(Rule query,
javatools.datatypes.ByteString[] newEdge)
It determines whether the rule contains an expensive query patterns of the forms
#(x, y) : r(z, x) r(z, y) or #(x, y) : r(y, z) r(x, z).
|
void |
DefaultMiningAssistant.getClosingAtoms(Rule rule,
double minSupportThreshold,
java.util.Collection<Rule> output)
Returns all candidates obtained by adding a closing edge (an edge with two existing variables).
|
void |
MiningAssistant.getClosingAtoms(Rule rule,
double minSupportThreshold,
java.util.Collection<Rule> output)
Returns all rule candidates obtained by adding a new atom that does not contain
fresh variables.
|
protected void |
DefaultMiningAssistant.getDanglingAtoms(Rule query,
javatools.datatypes.ByteString[] edge,
double minSupportThreshold,
java.util.Collection<Rule> output)
It adds to the output all the rules resulting from adding dangling atom instantiation of "edge"
to the query.
|
void |
DefaultMiningAssistant.getDanglingAtoms(Rule query,
double minCardinality,
java.util.Collection<Rule> output)
Returns all candidates obtained by adding a new triple pattern to the query
|
void |
MiningAssistant.getDanglingAtoms(Rule rule,
double minSupportThreshold,
java.util.Collection<Rule> output)
Returns all candidates obtained by adding a new dangling atom to the query.
|
long |
MiningAssistant.getHeadCardinality(Rule query) |
void |
MiningAssistant.getInstantiatedAtoms(Rule rule,
double minSupportThreshold,
java.util.Collection<Rule> danglingEdges,
java.util.Collection<Rule> output)
Returns all candidates obtained by instantiating the dangling variable of the last added
triple pattern in the rule
|
protected void |
DefaultMiningAssistant.getInstantiatedAtoms(Rule query,
Rule parentQuery,
int bindingTriplePos,
int danglingPosition,
double minSupportThreshold,
java.util.Collection<Rule> output)
Application of the "Add instantiated atom" operator.
|
protected void |
MiningAssistant.getInstantiatedAtoms(Rule queryWithDanglingEdge,
Rule parentQuery,
int danglingAtomPosition,
int danglingPositionInEdge,
double minSupportThreshold,
java.util.Collection<Rule> output)
It returns all the refinements of queryWithDanglingEdge where the fresh variable in the dangling
atom has been bound to all the constants that keep the query above the support threshold.
|
long |
DefaultMiningAssistant.getTotalCount(Rule query) |
long |
MiningAssistant.getTotalCount(Rule candidate) |
boolean |
MiningAssistant.registerHeadRelation(Rule query) |
protected Rule |
DefaultMiningAssistant.rewriteProjectionQuery(Rule query,
int bindingTriplePos,
int bindingVarPos)
It identifies redundant patterns in queries and rewrites them accordingly
so that they become less expensive to evaluate.
|
boolean |
MiningAssistant.testConfidenceThresholds(Rule candidate)
It checks whether a rule satisfies the confidence thresholds and the
sky-line heuristic: the strategy that avoids outputting rules that do not
improve the confidence w.r.t their parents.
|
boolean |
RelationSignatureDefaultMiningAssistant.testConfidenceThresholds(Rule candidate) |
protected boolean |
MiningAssistant.testLength(Rule candidate)
Check whether the rule meets the length criteria configured in the object.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
MiningAssistant.buildInitialQueries(javatools.datatypes.IntHashMap<javatools.datatypes.ByteString> relations,
double minSupportThreshold,
java.util.Collection<Rule> output)
Given a list of relations with their corresponding support (one assistant could count based on the number of pairs,
another could use the number of subjects), it adds one rule per relation to the output.
|
void |
DefaultMiningAssistant.getClosingAtoms(Rule rule,
double minSupportThreshold,
java.util.Collection<Rule> output)
Returns all candidates obtained by adding a closing edge (an edge with two existing variables).
|
void |
MiningAssistant.getClosingAtoms(Rule rule,
double minSupportThreshold,
java.util.Collection<Rule> output)
Returns all rule candidates obtained by adding a new atom that does not contain
fresh variables.
|
protected void |
DefaultMiningAssistant.getDanglingAtoms(Rule query,
javatools.datatypes.ByteString[] edge,
double minSupportThreshold,
java.util.Collection<Rule> output)
It adds to the output all the rules resulting from adding dangling atom instantiation of "edge"
to the query.
|
void |
DefaultMiningAssistant.getDanglingAtoms(Rule query,
double minCardinality,
java.util.Collection<Rule> output)
Returns all candidates obtained by adding a new triple pattern to the query
|
void |
MiningAssistant.getDanglingAtoms(Rule rule,
double minSupportThreshold,
java.util.Collection<Rule> output)
Returns all candidates obtained by adding a new dangling atom to the query.
|
void |
DefaultMiningAssistant.getInitialAtoms(double minSupportThreshold,
java.util.Collection<Rule> output) |
void |
MiningAssistant.getInitialAtoms(double minSupportThreshold,
java.util.Collection<Rule> output)
Returns a list of one-atom queries using the relations from the KB
|
void |
DefaultMiningAssistant.getInitialAtomsFromSeeds(java.util.Collection<javatools.datatypes.ByteString> relations,
double minCardinality,
java.util.Collection<Rule> output) |
void |
MiningAssistant.getInitialAtomsFromSeeds(java.util.Collection<javatools.datatypes.ByteString> relations,
double minSupportThreshold,
java.util.Collection<Rule> output)
Returns a list of one-atom queries using the head relations provided in the collection relations.
|
void |
MiningAssistant.getInstantiatedAtoms(Rule rule,
double minSupportThreshold,
java.util.Collection<Rule> danglingEdges,
java.util.Collection<Rule> output)
Returns all candidates obtained by instantiating the dangling variable of the last added
triple pattern in the rule
|
void |
MiningAssistant.getInstantiatedAtoms(Rule rule,
double minSupportThreshold,
java.util.Collection<Rule> danglingEdges,
java.util.Collection<Rule> output)
Returns all candidates obtained by instantiating the dangling variable of the last added
triple pattern in the rule
|
protected void |
DefaultMiningAssistant.getInstantiatedAtoms(Rule query,
Rule parentQuery,
int bindingTriplePos,
int danglingPosition,
double minSupportThreshold,
java.util.Collection<Rule> output)
Application of the "Add instantiated atom" operator.
|
protected void |
MiningAssistant.getInstantiatedAtoms(Rule queryWithDanglingEdge,
Rule parentQuery,
int danglingAtomPosition,
int danglingPositionInEdge,
double minSupportThreshold,
java.util.Collection<Rule> output)
It returns all the refinements of queryWithDanglingEdge where the fresh variable in the dangling
atom has been bound to all the constants that keep the query above the support threshold.
|
| Modifier and Type | Method and Description |
|---|---|
Rule |
Rule.addAtom(javatools.datatypes.ByteString[] newAtom,
double cardinality) |
Rule |
Rule.addAtom(javatools.datatypes.ByteString[] newAtom,
int cardinality,
javatools.datatypes.ByteString joinedVariable,
javatools.datatypes.ByteString danglingVariable)
Returns a new rule that contains all the atoms of the current rule plus
the atom provided as argument.
|
Rule |
Rule.addEdges(javatools.datatypes.ByteString[] newEdge1,
javatools.datatypes.ByteString[] newEdge2)
Returns a new rule that is a copy of the current rules plus the two edges
sent as arguments.
|
static Rule |
Rule.combineRules(java.util.List<Rule> rules)
Given a list of rules A1 => X1, ...
|
Rule |
Rule.instantiateConstant(int danglingPosition,
javatools.datatypes.ByteString constant,
double cardinality)
Returns a new query where the variable at the dangling position of the
last atom has been unified to the provided constant.
|
Rule |
Rule.instantiateConstant(int triplePos,
int danglingPosition,
javatools.datatypes.ByteString constant,
double cardinality)
Return a new query where the variable at position danglingPosition in
triple at position triplePos is bound to constant.
|
Rule |
Rule.rewriteQuery(javatools.datatypes.ByteString[] remove,
javatools.datatypes.ByteString[] target,
javatools.datatypes.ByteString victimVar,
javatools.datatypes.ByteString targetVar) |
static Rule |
AMIEParser.rule(java.lang.String s)
Parsers an AMIE rule from a string.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<Rule> |
Rule.getAllAncestors() |
java.util.List<Rule> |
Rule.getAncestors() |
static java.util.List<Rule> |
AMIEParser.rules(java.io.File f) |
| Modifier and Type | Method and Description |
|---|---|
static int |
Rule.findFunctionalVariable(Rule q,
KB d) |
static void |
AMIEParser.normalizeRule(Rule q) |
void |
Rule.setParent(Rule parent)
Sets the rule's parent rule.
|
| Modifier and Type | Method and Description |
|---|---|
static Rule |
Rule.combineRules(java.util.List<Rule> rules)
Given a list of rules A1 => X1, ...
|
| Constructor and Description |
|---|
Rule(Rule otherQuery,
double support)
Creates a new query as a clone of the query sent as argument with the given
support.
|