Model-agnostic symbolic-regression data layer: skeleton/expression sampling, priors, holdout, datasets.
Project description
symbolic_data
The model-agnostic symbolic-regression data layer, carved out of
flash-ansr: skeleton/expression sampling,
priors, (X, y) support sampling, holdout management, and dataset construction.
Both symbolic-regression methods (for training holdout) and the
srbf eval framework depend on it, so training,
holdout, and evaluation draw from one source of truth. Depends only on
simplipy + numpy/sklearn.
Install
pip install symbolic-data
Quick start
import symbolic_data
# 1. Sample (X, y) problems from a skeleton pool (the model-agnostic seam)
pool = symbolic_data.SkeletonPool.from_config("skeleton_pool.yaml")
pool.create(100)
for sample in symbolic_data.iter_samples(pool, n_support=32, noise_level=0.01, seed=0):
sample.x_support, sample.y_support, sample.expression # ready to fit / tokenize
# 2. Load a benchmark. All three curated sets ship as package data (no download), vendored
# from their canonical upstreams.
fastsrb = symbolic_data.load_benchmark("fastsrb") # 120 equations (Martinek, viktmar/FastSRB)
feynman = symbolic_data.load_benchmark("feynman") # 100 equations (Udrescu & Tegmark 2020)
nguyen = symbolic_data.load_benchmark("nguyen") # 12 equations (Uy et al. 2011; DSO)
dataset = feynman.sample("I.6.2a", n_points=100, random_state=0)
Extensibility
Distributions and benchmarks are pluggable via registries: in-process with
@symbolic_data.DISTRIBUTIONS.register("name") / @symbolic_data.BENCHMARKS.register("name"), or
across packages via importlib.metadata entry points (groups symbolic_data.distributions,
symbolic_data.benchmarks). A registered name drops into the same config slot as a builtin.
Versioning / reproducibility
v1 guarantees leak-safety (a seeded, shipped holdout grid + a robust symbolic/numeric
matcher), not cross-consumer byte-identical regeneration (the rng-Generator threading is a
separate, later phase). Curated benchmark specs ship as package data, vendored from their canonical
upstreams (tools/build_benchmark_specs.py), and stamp their source on .provenance.
Status: v0.3.0. Registry,
iter_samplesseam, the data-prep CLI, and curatedload_benchmarkloaders (FastSRB, Feynman, Nguyen) are in, each vendored from its canonical upstream. The Feynman/Nguyen specs are numerically verified against their source formulas (tools/build_benchmark_specs.py). Deferred: the MIA matched-control audit, the canonical-v1 holdout grid mint, and cross-consumer byte-identical sampling.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file symbolic_data-0.3.0.tar.gz.
File metadata
- Download URL: symbolic_data-0.3.0.tar.gz
- Upload date:
- Size: 68.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5484e1b65564a3461127a7e0a133e4c32b5099c8587628b7c42d72394f8a640b
|
|
| MD5 |
9008d8b68ded7f08891fdcf0176a455e
|
|
| BLAKE2b-256 |
4edbe20d933880a0bd6650719569328e079ca76a23f1350e1468b658d24fab04
|
Provenance
The following attestation bundles were made for symbolic_data-0.3.0.tar.gz:
Publisher:
publish.yaml on psaegert/symbolic-data
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
symbolic_data-0.3.0.tar.gz -
Subject digest:
5484e1b65564a3461127a7e0a133e4c32b5099c8587628b7c42d72394f8a640b - Sigstore transparency entry: 1999684112
- Sigstore integration time:
-
Permalink:
psaegert/symbolic-data@bde563bf03c31a1ed90dd9c9f4803e89a1e3fae6 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/psaegert
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@bde563bf03c31a1ed90dd9c9f4803e89a1e3fae6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file symbolic_data-0.3.0-py3-none-any.whl.
File metadata
- Download URL: symbolic_data-0.3.0-py3-none-any.whl
- Upload date:
- Size: 67.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a8df5a36b87d0ca5e68a1737f550873e3438ca543b896278918607612480e49
|
|
| MD5 |
4ff33c96823f12da8dcc96b845cb3cd6
|
|
| BLAKE2b-256 |
2e794abcd1a2567ac069745484d692a33c3818e999bd4f267f84b5a2dbf8859d
|
Provenance
The following attestation bundles were made for symbolic_data-0.3.0-py3-none-any.whl:
Publisher:
publish.yaml on psaegert/symbolic-data
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
symbolic_data-0.3.0-py3-none-any.whl -
Subject digest:
9a8df5a36b87d0ca5e68a1737f550873e3438ca543b896278918607612480e49 - Sigstore transparency entry: 1999684150
- Sigstore integration time:
-
Permalink:
psaegert/symbolic-data@bde563bf03c31a1ed90dd9c9f4803e89a1e3fae6 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/psaegert
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@bde563bf03c31a1ed90dd9c9f4803e89a1e3fae6 -
Trigger Event:
release
-
Statement type: