leaf - Learning Equations for Automated Function Discovery
A unified framework for symbolic regression (SR) and
multi-view symbolic regression (MvSR) designed for complex,
nonlinear systems, with particular applicability to ecological
datasets. The package implements a four-stage workflow: data
subset generation, functional form discovery, numerical
parameter optimization, and multi-objective evaluation. It
provides a high-level formula-style interface that abstracts
and extends multiple discovery engines: genetic programming
(via PySR), Reinforcement Learning with Monte Carlo Tree Search
(via RSRM), and exhaustive generalized linear model search.
'leaf' extends these methods by enabling multi-view discovery,
where functional structures are shared across groups while
parameters are fitted locally, and by supporting the
enforcement of domain-specific constraints, such as sign
consistency across groups. The framework automatically handles
data normalization, link functions, and back-transformation,
ensuring that discovered symbolic equations remain
interpretable and valid on the original data scale. Implements
methods following ongoing work by the authors (2026, in
preparation).