# trevorstephens/gplearn

Genetic Programming in Python, with a scikit-learn inspired API

Repository: https://github.com/trevorstephens/gplearn
Canonical: https://ross.abutalabs.com/products/gplearn
Homepage: http://gplearn.readthedocs.io/
Language: Python
License: BSD-3-Clause
License Family: permissive
Topics: genetic-programming, machine-learning, python, scikit-learn, symbolic-regression
Last push: 2026-08-14T23:44:19+00:00

## Health v2 (maintenance only)
Score: 75/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 33, longevity 100
- inputs: {"age_days": 4179, "days_push": 19, "days_rel": 238, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1881, forks 326 (observed 2026-08-28T04:05:48.622523+00:00)

## What it is
gplearn is a Python library implementing genetic programming with a scikit-learn compatible API, focused on symbolic regression. It provides SymbolicRegressor, SymbolicClassifier, and SymbolicTransformer estimators that fit into standard scikit-learn pipelines and grid search.

## Use cases
- discover mathematical formulas that fit my data
- symbolic regression in python
- evolve interpretable models instead of black-box regressors
- automated feature engineering with genetic programming
- binary classification with evolved expressions
- integrate genetic programming into a scikit-learn pipeline

## When to choose
- you want interpretable mathematical expressions rather than opaque models
- you need scikit-learn fit/predict compatibility for pipelines and grid search
- you want automated non-linear feature transformation

## When to avoid
- you need general-purpose genetic programming beyond symbolic regression
- you need state-of-the-art predictive accuracy on large noisy datasets
- you need GPU acceleration or very fast training

## Facets
- artifact type: library
- maturity: stable
- function: machine-learning, data-science
- domain: machine-learning, data-science
- platform: python
- tags: genetic-programming, symbolic-regression, scikit-learn, evolutionary-algorithms, feature-engineering

## Member repositories
- trevorstephens/gplearn (main) score 75

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:48.622523+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:13:59.344381+00:00, confidence not recorded.
  - readme: https://github.com/trevorstephens/gplearn (fetched 2026-08-28T04:05:48.622523+00:00, sha 2edd26646278)
  - registry_pypi: https://pypi.org/pypi/gplearn/json (fetched 2026-08-29T10:53:41.225616+00:00, sha 6b1689cbae54)
- Data as of 2026-08-30T08:39:29.467469+00:00.
