File size: 1,234 Bytes
b99b9ee
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
"""Verifier layer: parse hypothesis, simulate, score, summarise mismatch.

Public API:

- :func:`parse_equation` (``parser``): convert a SymPy-grammar string into a
  callable ODE right-hand-side, validated against a strict whitelist.
- :func:`simulate_hypothesis` (``simulator``): run the parsed RHS forward in
  time via ``scipy.integrate.odeint``.
- :func:`compute_match` (``metrics``): R-squared between observed and
  predicted trajectories.
- :func:`summarize_mismatch` (``mismatch``): generate a one-sentence English
  description of where prediction diverges from observation.
- :func:`compute_reward` (``reward``): combine all components into a
  :class:`RewardBreakdown`.
"""

from physix.verifier.metrics import compute_match, residual_summary
from physix.verifier.mismatch import summarize_mismatch
from physix.verifier.parser import ParseError, ParsedEquation, parse_equation
from physix.verifier.reward import compute_reward
from physix.verifier.simulator import SimulationError, simulate_hypothesis

__all__ = [
    "compute_match",
    "residual_summary",
    "summarize_mismatch",
    "ParseError",
    "ParsedEquation",
    "parse_equation",
    "compute_reward",
    "SimulationError",
    "simulate_hypothesis",
]