Skip to content

Add support for filtering invalid groundings out #87

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HRezaei
Copy link

@HRezaei HRezaei commented Mar 20, 2023

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 HRezaei force-pushed the feature/filter-groundings branch from 212b283 to 2139bca Compare March 20, 2023 07:27
@HRezaei HRezaei marked this pull request as draft March 20, 2023 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant