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.1.0.tar.gz (40.1 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.1.0-py3-none-any.whl (40.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: symbolic_data-0.1.0.tar.gz
  • Upload date:
  • Size: 40.1 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.1.0.tar.gz
Algorithm Hash digest
SHA256 3142cf11213b739917a6b7c5c22423c517b9b5f16fd8323644b18e895ed4a211
MD5 e1c78362ab6cb4cc85a2f40c3af794f4
BLAKE2b-256 082461905148724d1fdefbb8c3333f1ad294445660b515b7ea2072f9181009dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for symbolic_data-0.1.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.1.0-py3-none-any.whl.

File metadata

  • Download URL: symbolic_data-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 40.5 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c7cace1268433673d54aef99284d527609eb25e9306c280f1909309b36be4112
MD5 16250d290627ff38aab039c754f36c80
BLAKE2b-256 cf0bff14825f76424ec737b84acede2cbe09b2781e20c9f435ea3ddb266691a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for symbolic_data-0.1.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