Skip to content

Add PIR (Physics Intermediate Representation) symbolic regression method#210

Open
Qazi-pk wants to merge 12 commits into
cavalab:masterfrom
Qazi-pk:master
Open

Add PIR (Physics Intermediate Representation) symbolic regression method#210
Qazi-pk wants to merge 12 commits into
cavalab:masterfrom
Qazi-pk:master

Conversation

@Qazi-pk

@Qazi-pk Qazi-pk commented Jun 17, 2026

Copy link
Copy Markdown

PIR — Physics Intermediate Representation

Classical symbolic regression engine for automated physical law discovery from data.

Method

  • Monomial-basis search with log-linearization gate for power-law detection
  • Pairwise structure decomposition, RANSAC, sparse regression
  • Iterative residual refinement with Occam complexity penalty
  • No neural components — pure classical pipeline

Blind Feynman Tier A results

12/44 EXACT blind (zero seed wobble), v3.4
Secondary: +12/44 FORM_NUMERIC (correct functional form, transcendental constant as decimal — reported separately, never summed)
Previous baseline: 7/44 (v3.3)

Files

  • algorithms/PIR/regressor.py — sklearn-compatible wrapper
  • algorithms/PIR/install.sh — installs from public repo (MIT license)
  • algorithms/PIR/metadata.yml — method metadata
  • algorithms/PIR/requirements.txt — POT (Python Optimal Transport)

Links

Targeting master per @gAldeia's guidance in #203.

Qazi-pk added 9 commits June 17, 2026 16:39
Added metadata for the Physics Intermediate Representation (PIR) project, including authors, paper title, and description.
Implement PIRClassicRegressor and model function for SRBench.
Added metadata for the Physics Intermediate Representation (PIR) including authors, paper title, and description.
This file implements a classical PIR regressor for SRBench, including configuration and model handling.
@Qazi-pk

Qazi-pk commented Jun 18, 2026

Copy link
Copy Markdown
Author

12/44 EXACT blind (zero seed wobble), v3.4
Secondary: +12/44 FORM_NUMERIC (correct functional form, transcendental constant as decimal — reported separately, never summed)
Previous baseline: 7/44 (v3.3)

@Qazi-pk

Qazi-pk commented Jul 1, 2026

Copy link
Copy Markdown
Author

Update: The install failure is resolved.

The physics-engine package had a packaging issue (subpackages weren't being discovered by setuptools) plus some eager top-level imports pulling in optional modules that aren't needed for the regressor. I've fixed the packaging config and made the top-level imports lazy, tagged v3.4.1, and updated install.sh to point at it. A clean-room install (pip install "git+https://github.com/Qazi-pk/physics-engine.git@v3.4.1" in a fresh venv) now imports PIRRegressor successfully.

The remaining ModuleNotFoundError: No module named 'methods.pir' looks like the shared algorithms/ → methods/ harness mapping that's also failing other methods in this run (brush, eql, bsr, e2et). Happy to adjust the layout if there's a preferred structure — otherwise it appears to be on the infrastructure side. Thanks for taking the time to review.

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