Make => ?a <relation> ?b parent of => ?a <relation> CONST
falcaopetri opened this issue · comments
Hi,
I've been plotting the mined rules and their ancestors using Graphviz, resulting in a DAG visualization of the generated rules. This viz has been helping me getting insights on the mined rules, and especially on the pruning and filtering strategies I may adopt.
One thing that was annoying me was that rule => ?a <relation> ?b
was not parent of the rule => ?a <relation> CONST
. I then changed how getInstantiatedAtoms
is called during the getInitialAtoms->buildInitialQueries
process.
I'd like to know if there is any side effect on doing so. At first, I thought that maybe -optimai
(adaptive instantiations) would be a problem. Still, it is not the case since it is only used on a different execution thread.
My modification
When calling getInstantiatedAtoms
, I just pass candidate
instead of null
.
https://github.com/lajus/amie/blob/e76c3a9c7cc4425e8bc6e51eb299606b386d5c59/mining/src/main/java/amie/mining/assistant/MiningAssistant.java#L538-L558
Regards,
Antonio.
Hi Antonio,
From a logical point of view, your suggestion makes perfect sense.
Rules parenting information is stored to apply the skyline criterion, i.e., a rule is output if its confidence is better than the confidence of all its parents. However, AMIE calculates confidence only for closed rules, which means that non-closed parents are simply ignored at the application of this criterion. Intuitively I do not foresee any side effects. Perhaps @lajus can see something I cannot.
Cheers,
Luis