Skip to content

Add PIR (Physics Intermediate Representation) method - #202

Closed
Qazi-pk wants to merge 1 commit into
cavalab:devfrom
Qazi-pk:add-pir-method
Closed

Qazi-pk wants to merge 1 commit into
cavalab:devfrom
Qazi-pk:add-pir-method

Conversation

@Qazi-pk

@Qazi-pk Qazi-pk commented May 29, 2026

Copy link
Copy Markdown
Contributor

Method: PIR (Physics Intermediate Representation)

A torch-free symbolic regression method combining dimensional analysis,
RANSAC consensus filtering, residual refinement, and sparse coefficient
selection. Sklearn-compatible.

Files added

  • experiment/methods/PIRRegressor.py — exports est, hyper_params,
    complexity(est), model(est, X)
  • experiment/methods/src/PIR_install.sh — pip-installs physics-engine@v0.1.0
    from the public source repo (no source code vendored in this PR)

Configuration

Blind-sweep settings (SEED=0):
enforce_dimensions=False, allowed_powers=[1, 2],
include_pairwise_products=True, use_ransac=True, use_residual=True,
use_sparse=True, use_ot_loss=False, add_physics_features=False.
Other parameters at defaults.

Honest scope

Blind Tier A (Feynman, SRBench-compatible protocol, 5 seeds):
7/44 solved (≈7.6 mean) under the configuration above. An earlier
27.3% figure in the project's own notes was formula-peeking and is not
the blind result.

The current classical engine is architecturally limited to ≤ 2-variable
monomial structures (pairwise structure detector); extension to ≥ 3-variable
laws is future work and not part of this PR.

Open question for reviewers

model(est, X) returns a sympy-parseable string using the column names of
the input pd.DataFrame X. If SRBench's symbolic-equivalence check
expects a specific naming convention (e.g. x_0..x_m vs Feynman's q1,
Ef, …), please flag — happy to adjust the variable mapping in
model() to match.

Checklist

  • Targets dev branch
  • Sklearn-compatible API (fit, predict, random_state)
  • No source code vendored; install.sh pulls from stable tag
  • model(est, X) returns a sympy-compatible string
  • MIT licensed

Symbolic regression with dimensional analysis, RANSAC consensus,
residual refinement, and sparse coefficient selection. Torch-free.

- experiment/methods/PIRRegressor.py: sklearn-compatible estimator
  with est, hyper_params, complexity(est), model(est, X)
- experiment/methods/src/PIR_install.sh: installs physics-engine@v0.1.0

Engine: https://github.com/Qazi-pk/physics-engine (MIT, v0.1.0, commit 736a89c)
@Qazi-pk

Qazi-pk commented May 29, 2026

Copy link
Copy Markdown
Contributor Author

CI is failing in Set up job with actions/cache@v2 deprecated — this appears to be an upstream workflow issue, not specific to this PR (no project files are reached before the failure).

Happy to wait while it's addressed, or to open a small follow-up PR bumping the cache action version if that would help.

@Qazi-pk Qazi-pk closed this Jun 18, 2026
lacava added a commit that referenced this pull request Aug 13, 2026
dev is being restored as the live integration branch that CONTRIBUTING.md
directs contributors to. It had no CI coverage, so PRs targeting it either
ran nothing or auto-failed on retired action versions (#215), and recent
submissions (#202, #205, #214, #215) were all closed and resubmitted
against master.

Adds dev to the push and pull_request triggers. docker-compose is kept:
it still carries unmerged commits as recent as 2026-06-12.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
lacava added a commit that referenced this pull request Aug 13, 2026
dev is the live integration branch that CONTRIBUTING.md points contributors
to, but it had no CI coverage, so PRs against it either ran nothing or
auto-failed on retired action versions (#215). #202, #205, #214 and #215 were
all closed and resubmitted against master.

adds dev to the push and pull_request triggers. docker-compose stays, it still
has unmerged commits as recent as 2026-06-12.
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