Skip to main content

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 (spec fetched + cached from the psaegert/ansr-data HF dataset)
fastsrb = symbolic_data.load_benchmark("fastsrb")
dataset = fastsrb.sample("II.38.3", n_points=100)

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). Benchmark specs are HF-versioned and stamped on .provenance.

Status: v0.1.0. Registry, iter_samples seam, and load_benchmark (FastSRB) are in. Deferred: the MIA matched-control audit, curated benchmark loaders (Feynman/Nguyen), the canonical-v1 holdout grid mint, and cross-consumer byte-identical sampling.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

symbolic_data-0.2.0.tar.gz (45.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

symbolic_data-0.2.0-py3-none-any.whl (45.6 kB view details)

Uploaded Python 3

File details

Details for the file symbolic_data-0.2.0.tar.gz.

File metadata

  • Download URL: symbolic_data-0.2.0.tar.gz
  • Upload date:
  • Size: 45.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for symbolic_data-0.2.0.tar.gz
Algorithm Hash digest
SHA256 bf15c2673f5d0dc859fa500b8116278e3ee3ca2bead4d5f9c1c57cf9a1333bc7
MD5 a756cdb7783dd2c1ae980da2f02e193f
BLAKE2b-256 74bef855c1f8b5afcb6b5cac5cbf37f048e59bd1edd429fbc36a3a0a8a7bdb0b

See more details on using hashes here.

Provenance

The following attestation bundles were made for symbolic_data-0.2.0.tar.gz:

Publisher: publish.yaml on psaegert/symbolic-data

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file symbolic_data-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: symbolic_data-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 45.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for symbolic_data-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0a5782a2288cc99c1f239d8cd46449e206fc48173a848518a89e95a13bc72e35
MD5 bfa2e2990bf083ad12a8f7898ec673f3
BLAKE2b-256 905e5864619ed2eb9be679920d03ee0501012f50e6a3dd687476d7268ec8f7fe

See more details on using hashes here.

Provenance

The following attestation bundles were made for symbolic_data-0.2.0-py3-none-any.whl:

Publisher: publish.yaml on psaegert/symbolic-data

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page