LNN icon indicating copy to clipboard operation
LNN copied to clipboard

Add support for filtering invalid groundings out

Open HRezaei opened this issue 1 year ago • 0 comments

As you already know, doing outer join on constants produces many groundings which might be semantically invalid or impossible. This increases the size of the grounding table unnecessarily which in turn impacts performance drastically. To reduce search space, a proper solution might be to allow non-primitive types to be used in place of constants and then, to do type checking. Maybe you have plans for fixing this in a better way. However, here is a small change that makes this possible at least for some applications, in the meantime.

This PR allows developers to define their own neurons or formula (possibly inherited from LNN classes) and add a filter_valid_groundings method which takes the data frame of all potential groundings and returns another data frame in place. Thus they have the opportunity to filter out incompatible groundings.

HRezaei avatar Mar 20 '23 07:03 HRezaei