Skip to content

Conversation

@tinsaeabreham45
Copy link

This PR introduces a utility function called eq-prob-python designed to estimate the probability of logical equivalence for variables across different blocks within a MeTTa pattern. This is particularly relevant for scenarios involving uncertain knowledge and probabilistic reasoning, especially in the context of Hyperon-based systems.

Key Features Functions:

  • Estimates Joint Variable Probabilities: Calculates the probability that jointly occurring variables in a pattern will be instantiated with equivalent values from the provided db context.
  • Sort By Abstraction: Employs a novel mechanism to sort subpatterns by their abstraction level (using is-blk-more-abstract), ensuring that more general forms are processed first. This helps in correctly accounting for potential specializations and generalizations when estimating probabilities.
  • MeTTa for Unification: Utilizes the underlying MeTTa interpreter for robust unification checks, ensuring consistency with Hyperon's logical framework.
  • Support for Nested Structures: Handles nested MeTTa expressions by converting them into Python lists for internal processing, then back to MeTTa expressions for unification.
  • Integrated into hyperon-miner: Provided as an @register_atoms function (eq-prob-func) to be directly usable within MeTTa code, allowing for seamless integration into probabilistic reasoning workflows.

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.

2 participants