Skip to content
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

Model equivalence #24

Open
NaweedAghmad opened this issue Apr 17, 2022 · 3 comments
Open

Model equivalence #24

NaweedAghmad opened this issue Apr 17, 2022 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@NaweedAghmad
Copy link
Collaborator

Allow two models to be compared to one another using __eq__ dunder.
This compares all the formulae, their connectivity and corresponding facts at convergence (i.e. does not consider any gradient computations)

@NaweedAghmad NaweedAghmad added enhancement New feature or request good first issue Good for newcomers labels Apr 17, 2022
@Thomasparsley
Copy link

What are the important slots to compare in _Formula?

I have these slots compared for equivalence:

  • name
  • world
  • arity
  • variables
  • operands
  • unique_vars

What other slots are important for comparison? Is grounding_table also important?

@nDiv
Copy link
Collaborator

nDiv commented Apr 23, 2022

We also want groundings and corresponding truth values. One idea is to compare all groundings gotten from this and then compare their states or more directly their truth tensors. Comparing tensors is more general and applies to fuzzy truth values whereas states are limited to classical logic since for fuzzy logic the state just says it's fuzzy.

@NaweedAghmad
Copy link
Collaborator Author

#71 included the equivalence checks for objects to allow neurons and symbols to be matched.
Since each model is simply a collection of connected formulae, we should have all objects required for this --- each formula will directly tell us about the following:

name
world
arity
variables
operands
unique_vars

Its still required to pull out the equivalence of different models, which requires us to store/match the variables in the model:

  • nodes
  • node_names
  • query
    etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants