Package: leaf 0.1.0

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).

Authors:Francisco Martins [cre, aut, cph], Pedro Cardoso [aut], Manuel Lopes [aut], Vasco Branco [aut], INESC-ID [fnd], intell-sci-comput [cph]

leaf_0.1.0.tar.gz
leaf_0.1.0.zip(r-4.7-any)leaf_0.1.0.zip(r-4.6-any)leaf_0.1.0.zip(r-4.5-any)
leaf_0.1.0.tgz(r-4.6-any)leaf_0.1.0.tgz(r-4.5-any)
leaf_0.1.0.tar.gz(r-4.7-any)leaf_0.1.0.tar.gz(r-4.6-any)
leaf_0.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
leaf/json (API)

# Install 'leaf' in R:
install.packages('leaf', repos = c('https://1-0-go.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/nabiaai/leaf/issues

On CRAN:

Conda:

4.00 score 22 scripts 318 downloads 14 exports 36 dependencies

Last updated from:88a5398bf4. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK131
source / vignettesOK298
linux-releaseOK132
macos-releaseOK174
macos-oldrelOK173
windows-develOK93
windows-releaseOK86
windows-oldrelOK80
wasm-releaseOK110

Exports:backend_availablecheck_python_environmentgenerate_group_subsetsgenerate_shuffle_subsetsgenerate_subsetsget_python_libget_python_pathinstall_leafleaf_dataload_leaf_analysispareto_2dplot_paretoSymbolicRegressoruninstall_leaf

Dependencies:clicpp11dplyrfarvergenericsggplot2gluegtablehereisobandjsonlitelabelinglatticelifecyclemagrittrMatrixpillarpkgconfigpngR6rappdirsRColorBrewerRcppRcppTOMLreticulaterlangrprojrootrstudioapiS7scalestibbletidyselectutf8vctrsviridisLitewithr

Binary classification with leaf
Stage 1: Initialize the symbolic regressor | Stage 2: Discover equation skeletons | Stage 3: Fit parameters and compute loss | Stage 4: Evaluate additional metrics

Last update: 2026-04-21
Started: 2026-04-21

Cross-Validation for Symbolic Regression

Last update: 2026-04-21
Started: 2026-04-21

Getting Started with leaf
Introduction | Load package | Initialize a symbolic regression analysis | Load the data | Define the formula | Search for candidate equations | Fit equation parameters | Evaluate equations | Make predictions | Inspect equation | See final results | Plot pareto front | Compute optimal threshold (only for classification tasks) | Save and load analysis

Last update: 2026-04-21
Started: 2026-04-21

Initialization

Last update: 2026-04-21
Started: 2026-04-21

Introduction to 2D Pareto Fronts

Last update: 2026-04-21
Started: 2026-04-21

Manual Symbolic Regression: Testing Hypotheses
Introduction | Installation | Load package | Define the formula and custom equations | Define the manual search | Load the data | Register equations | Fit parameters and inspect results

Last update: 2026-04-21
Started: 2026-04-21

Minimal Example: Quick Start

Last update: 2026-04-21
Started: 2026-04-21

Multi-View Symbolic Regression with leaf

Last update: 2026-04-21
Started: 2026-04-21

Train-Test Splitting for Symbolic Regression

Last update: 2026-04-21
Started: 2026-04-21