Learning Equations for Automated Function Discovery
Overview
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).
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- WARNING12 OK, 1 WARNING2026-06-08
- OK8 OK2026-04-22
Documentation
- Help pages
- 16 (2 internal)includes a package overview page
- Examples that run
- 73%8 run in a plain check · 2 only when donttest examples are enabled (R CMD check --as-cran) · 1 never run
- Exported functions with examples
- 79%
- Documented parameters
- 100%
- Return-value docs
- 93%
- Help pages citing references
- 13%
- Binary classification with leaf HTML
- Cross-Validation for Symbolic Regression HTML
- Getting Started with leaf HTML
- Initialization HTML
- Introduction to 2D Pareto Fronts HTML
- Manual Symbolic Regression: Testing Hypotheses HTML
- Minimal Example: Quick Start HTML
- Multi-View Symbolic Regression with leaf HTML
- Train-Test Splitting for Symbolic Regression HTML
Downloads
Repository
Checks run against github.com/nabiaai/leaf on 2026-10-18.
No development-tooling practices detected in the upstream repository.
Dependencies
Installing leaf adds 34 packages (18 with compiled code, 21 MB of source tarballs). Heaviest: ggplot2 6.0 MB, Rcpp 1.8 MB, reticulate 1.6 MB.
Code & Tests
Datasets
People & History
- RR 4.6.0 released · 2026-04-24
- 0.1.0Latest2026-04-21 · current release
- RR 4.5.0 released · 2025-04-11
Package metadata
- First published
- 2026-04-21
- Total releases
- 1 / 1 yrs
- License
- MIT + file LICENSE OSI
- Copyright
- see inst/COPYRIGHTS
- Download size
- 850 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("leaf")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-20, which the citation names so these numbers can be found later. More on citing and the projects behind them.