Add PIR (Physics Intermediate Representation) method#202
Open
Qazi-pk wants to merge 1 commit into
Open
Conversation
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)
Author
|
CI is failing in Set up job with Happy to wait while it's addressed, or to open a small follow-up PR bumping the cache action version if that would help. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
736a89c)Files added
experiment/methods/PIRRegressor.py— exportsest,hyper_params,complexity(est),model(est, X)experiment/methods/src/PIR_install.sh— pip-installsphysics-engine@v0.1.0from 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 ofthe input
pd.DataFrame X. If SRBench's symbolic-equivalence checkexpects a specific naming convention (e.g.
x_0..x_mvs Feynman'sq1,Ef, …), please flag — happy to adjust the variable mapping inmodel()to match.Checklist
devbranchfit,predict,random_state)install.shpulls from stable tagmodel(est, X)returns a sympy-compatible string