eqdisco: discovering equations from data ======================================== .. image:: _static/banner.png :alt: eqdisco :class: fc-banner **eqdisco** searches the space of mathematical expressions for equations that explain data, and then helps to understand, check and deploy what it found. It is the Python successor of the GP-OLS MATLAB toolbox of Madár, Abonyi and Szeifert (Ind. Eng. Chem. Res., 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, adds several new ones, and provides tools for domain knowledge, model analysis and MLOps. Every estimator follows the scikit-learn API. .. grid:: 1 2 2 3 :gutter: 3 .. grid-item-card:: Genetic programming :link: auto_examples/02_gp/index :link-type: doc Tree GP with linear scaling, Levenberg--Marquardt constants, lexicase, NSGA-II and age--fitness Pareto selection, islands, model selection. .. grid-item-card:: GP-OLS and multi-gene GP :link: auto_examples/03_gpols/index :link-type: doc Linear-in-parameters models, error reduction ratios, OLS pruning, ERR-guided variation and the cooperative OLS--GP library. .. grid-item-card:: Sparse and exhaustive search :link: auto_examples/04_sparse/index :link-type: doc STLSQ, Lasso, FROLS and best subset on term libraries; FFX; enumeration of all small expressions with MDL selection. .. grid-item-card:: Probabilistic and LLM-guided search :link: auto_examples/05_probabilistic/index :link-type: doc The Bayesian machine scientist, risk-seeking grammar cross-entropy search, and a safe protocol for expressions proposed by language models. .. grid-item-card:: Dynamic systems :link: auto_examples/06_dynamics/index :link-type: doc NARX identification with GP-OLS, order selection, free-run simulation, SINDy and symbolic ODEs. .. grid-item-card:: Beyond regression :link: auto_examples/07_beyond/index :link-type: doc Critical-equation classifiers and goal-oriented symbolic projections for visualization and soft sensors. .. grid-item-card:: Domain knowledge :link: auto_examples/08_knowledge/index :link-type: doc Units and dimensional consistency, Buckingham Π, shape constraints, separability and symmetry tests. .. grid-item-card:: Model analysis :link: auto_examples/09_analysis/index :link-type: doc Simplification, validation, confidence and prediction intervals, Sobol indices, building blocks, model families, ensembles. .. grid-item-card:: MLOps :link: auto_examples/10_mlops/index :link-type: doc Code generation, PMML, model registry and cards, drift monitoring, benchmarks, one-page reports. Quick start ----------- .. code-block:: python 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 print(eq.export.to_c(sr.equation_)) # deployable code .. toctree:: :maxdepth: 1 :hidden: installation auto_examples/index api/index book migration citing changelog