eqdisco: discovering equations from data in Python
eqdisco searches the space of mathematical expressions for equations that explain data, and then helps to understand, check and deploy what it found. It grew out of the GP-OLS MATLAB toolbox of Madár, Abonyi and Szeifert (Ind. Eng. Chem. Res. 44(9), 3178–3186, 2005), in which genetic programming proposes the structure of a linear-in-parameters model and orthogonal least squares prunes the terms that do not contribute. Around this method the package collects the families of symbolic regression that have proved themselves in the literature — tree-based genetic programming with parameter optimization and multi-objective selection, multi-gene GP, sparse regression (SINDy, FFX), exhaustive and Bayesian search, grammar-based cross-entropy search, and LLM-proposed expressions — and adds tools for domain knowledge, model analysis and MLOps. All estimators follow the scikit-learn API.
| Module | Contents |
|---|---|
eqdisco.expr, eqdisco.equation |
prefix-tree Expression with protected primitives, analytic parameter Jacobian, interval arithmetic and SymPy conversion; the fitted Equation (predict, metrics, LaTeX, JSON) |
SymbolicRegressor, SymbolicClassifier |
tree GP: ramped half-and-half or PTC2 initialization, subtree/point/hoist/shrink/semantic variation, linear scaling, Levenberg–Marquardt parameter optimization, tournament, double-tournament, ε-lexicase, NSGA-II and age–fitness Pareto selection, islands, Pareto archive and model selection by BIC, knee, PySR score or validation |
MultiGeneRegressor, GPOLSRegressor, CooperativeOLSRegressor |
multi-gene GP; GP-OLS with error-reduction-ratio pruning; new: ERR-guided variation and a cooperative OLS–GP term library |
SymbolicTransformer |
goal-oriented symbolic projections (Sammon, Fisher, neighbourhood, target) after Dörgő, Kulcsár and Abonyi (2021) |
SparseRegressor, FFXRegressor |
STLSQ, Lasso, FROLS and best-subset regression on polynomial, function and hinge libraries; fast function extraction |
ExhaustiveRegressor, BayesianSymbolicRegressor, GrammarCERegressor, LLMGuidedRegressor |
enumeration with MDL selection; Bayesian machine scientist with parallel tempering; risk-seeking grammar cross-entropy search (new); a provider-independent protocol for language-model proposals |
eqdisco.dynamics |
NARX regressors and free-run simulation, order scan, derivative estimation, SINDy, SymbolicODE, ODEModel |
eqdisco.knowledge |
SI units and dimensional consistency, Buckingham Π, shape constraints by sampling or interval arithmetic, separability and symmetry tests on a neural surrogate |
eqdisco.simplify, eqdisco.analysis |
rule-based and SymPy simplification, coefficient rounding; Pareto tools, cross-validation of searches, residual diagnostics, Wald/profile/bootstrap intervals, Sobol indices, building blocks, variable interaction networks, model families |
eqdisco.viz, eqdisco.interactive |
trees, typeset equations, Pareto fronts, convergence, parity and residual plots, partial dependence, sensitivity, ERR paths, families, phase portraits, prediction bands, dashboards; plotly twins |
eqdisco.export, eqdisco.mlops |
code generation for Python, NumPy, C, MATLAB, Julia, Excel and LaTeX; PMML 4.4 and JSON; model registry, model cards, run tracker (optional MLflow), drift monitor |
eqdisco.datasets, eqdisco.benchmarks |
Nguyen, Koza, Keijzer, Vladislavleva, Pagie, Friedman and Feynman problems; Kepler, thermal runaway and dynamical systems; benchmark runner with the SRBench solution criterion |
Installation
pip install eqdisco
Python ≥ 3.10; depends on numpy, scipy, sympy, scikit-learn, pandas, networkx
and matplotlib. pip install "eqdisco[all]" adds plotly and MLflow.
Quick start
import numpy as np
import eqdisco as eq
planets = eq.datasets.load_kepler() # semi-major axis a, period T
sr = eq.SymbolicRegressor(population_size=300, generations=25, feature_names=["a"],
functions=("add", "sub", "mul", "div", "sqrt"), random_state=0)
sr.fit(planets[["a"]].to_numpy(), planets["T"].to_numpy())
print(sr.equation_) # 0.003055 + 0.9994 * sqrt(a) * a
eq.viz.plot_pareto(sr) # accuracy against complexity
rng = np.random.default_rng(0) # GP-OLS: terms, weights, ERR
X = rng.normal(size=(300, 3))
y = 1.5 * X[:, 0] * X[:, 1] - 0.8 * X[:, 2] ** 2
gp = eq.GPOLSRegressor(generations=20, random_state=0).fit(X, y)
print(gp.gene_table())
print(eq.export.to_c(sr.equation_)) # deployable code
Documentation and book
- Documentation, gallery of 41 runnable examples and API reference: https://complexsystemsintelligence.github.io/eqdisco
- The companion book, Discovering Equations from Data with Python: Symbolic regression, genetic programming and the eqdisco toolbox (CC BY 4.0): PDF, EPUB, web edition
Citing
Please cite the toolbox and the original publications of the methods you use (see CITATION.cff):
J. Abonyi, eqdisco: equation discovery, symbolic regression and genetic programming in Python, version 1.0, 2026.
J. Madár, J. Abonyi, F. Szeifert, Genetic programming for the identification of nonlinear input–output models, Industrial & Engineering Chemistry Research 44(9) (2005) 3178–3186, doi:10.1021/ie049626e.
Acknowledgments
Developed at the University of Pannonia, Veszprém, by the Complex Systems Intelligence group (abonyilab.com). The package builds on the GP-OLS toolbox of János Madár, János Abonyi and Ferenc Szeifert and on the genetic programming studies of Alex Kummer, Tamás Varga, Gyula Dörgő and Tibor Kulcsár. The research was supported by the National Research, Development and Innovation Office of Hungary (NKFIH) through the OTKA 143482 project.
License
MIT for the software; CC BY 4.0 for the book.
Metadata
Release files for eqdisco 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| eqdisco-1.0.tar.gz | 183.6 kB | With provenance | Details for eqdisco-1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| eqdisco-1.0-py3-none-any.whl | Python 3 | none | any | Details for eqdisco-1.0-py3-none-any.whl |
Total release size: 341.7 kB
Release files / eqdisco-1.0.tar.gz
| Download URL | eqdisco-1.0.tar.gz |
|---|---|
| Size | 183.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8ffe41e2d45579fbc350f9cb476d000d7bb5cc6ad5d7de47bad733195226f486
|
|
BLAKE2b-256 checksum How to use checksums |
a745a534c41d7761406facfe048190ef6949b746593a9102ded334a439b2b036
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logRelease files / eqdisco-1.0-py3-none-any.whl
| Download URL | eqdisco-1.0-py3-none-any.whl |
|---|---|
| Size | 158.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db836c87bcb7ee8af6c2da57320ed1da1100544dc47ef3ae3f376ad4ff04b07e
|
|
BLAKE2b-256 checksum How to use checksums |
6de3a8b5e71d25b3060c5561f7dd0674ffd2ede3f34a8cf09362043130243ef9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logSecurity for eqdisco 1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for eqdisco-1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.