Skip to main content

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

Project description

Version License Documentation Status Test Status Test Coverage Code Health

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

Welcome to gplearn!

gplearn implements Genetic Programming in Python, with a scikit-learn inspired and compatible API.

While Genetic Programming (GP) can be used to perform a very wide variety of tasks, gplearn is purposefully constrained to solving symbolic regression problems. This is motivated by the scikit-learn ethos, of having powerful estimators that are straight-forward to implement.

Symbolic regression is a machine learning technique that aims to identify an underlying mathematical expression that best describes a relationship. It begins by building a population of naive random formulas to represent a relationship between known independent variables and their dependent variable targets in order to predict new data. Each successive generation of programs is then evolved from the one that came before it by selecting the fittest individuals from the population to undergo genetic operations.

gplearn retains the familiar scikit-learn fit/predict API and works with the existing scikit-learn pipeline and grid search modules. The package attempts to squeeze a lot of functionality into a scikit-learn-style API. While there are a lot of parameters to tweak, reading the documentation should make the more relevant ones clear for your problem.

gplearn supports regression through the SymbolicRegressor, binary classification with the SymbolicClassifier, as well as transformation for automated feature engineering with the SymbolicTransformer, which is designed to support regression problems, but should also work for binary classification.

gplearn is built on scikit-learn and a fairly recent copy is required for installation. If you come across any issues in running or installing the package, please submit a bug report.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gplearn-0.4.3.tar.gz (2.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gplearn-0.4.3-py3-none-any.whl (40.3 kB view details)

Uploaded Python 3

File details

Details for the file gplearn-0.4.3.tar.gz.

File metadata

  • Download URL: gplearn-0.4.3.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for gplearn-0.4.3.tar.gz
Algorithm Hash digest
SHA256 3ce24bdf25fbc33ccf0b041a75e63db27804bf103e49e9f6f20824cf673b0047
MD5 2328cfed97ee3e57f08c7e8c0f30a6e2
BLAKE2b-256 43fc2e5195be8489b633438489483e45c940829a74f4101720d9bf1efd0319dc

See more details on using hashes here.

File details

Details for the file gplearn-0.4.3-py3-none-any.whl.

File metadata

  • Download URL: gplearn-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 40.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for gplearn-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e49838b57efa25dadf0e9b52df029254c826cf9bf6d1e8afd5f964ce8f213382
MD5 9d525ae62937e2895d053624afa15578
BLAKE2b-256 275e5a90d0911e160770f1824b5f475a9612e9dfafc90224d0258aab8172ed01

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page