Skip to main content

EDAspy is a Python package that implements Estimation of Distribution Algorithms. EDAspy allows toeither use already existing implementations or customize the EDAs baseline easily building it bymodules so new research can be easily developed. It also has several benchmarks for comparisons.

Project description

PyPI PyPI license Downloads Documentation Status

EDAspy

Introduction

EDAspy presents some implementations of the Estimation of Distribution Algorithms (EDAs). EDAs are a type of evolutionary algorithms. Depending on the type of the probabilistic model embedded in the EDA, and the type of variables considered, we will use a different EDA implementation.

The pseudocode of EDAs is the following:

  1. Random initialization of the population.

  2. Evaluate each individual of the population.

  3. Select the top best individuals according to cost function evaluation.

  4. Learn a probabilistic model from the best individuals selected.

  5. Sampled another population.

  6. If stopping criteria is met, finish; else, go to 2.

EDAspy allows to create a custom version of the EDA. Using the modular probabilistic models and the initializators, this can be embedded into the EDA baseline and used for different purposes. If this fits you, take a look on the examples section to the EDACustom example.

EDAspy also incorporates a set of benchmarks in order to compare the algorithms trying to minimize these cost functions.

The following implementations are available in EDAspy:

  • UMDAd: Univariate Marginal Distribution Algorithm binary. It can be used as a simple example of EDA where the variables are binary and there are not dependencies between variables. Some usages include feature selection, for example.

  • UMDAc: Univariate Marginal Distribution Algorithm continuous. In this EDA all the variables assume a Gaussian distribution and there are not dependencies considered between the variables. Some usages include hyperparameter optimization, for example.

  • EGNA: Estimation of Gaussian Distribution Algorithm. This is a complex implementation in which dependencies between the variables are considered during the optimization. In each iteration, a Gaussian Bayesian network is learned and sampled. The variables in the model are assumed to be Gaussian and also de dependencies between them. This implementation is focused in continuous optimization.

  • EMNA: Estimation of Multivariate Normal Algorithm. This is a similar implementation to EGNA, in which instead of using a Gaussian Bayesian network, a multivariate Gaussian distribution is iteratively learned and sampled. As in EGNA, the dependencies between variables are considered and assumed to be linear Gaussian. This implementation is focused in continuous optimization.

  • Categorical EDA. In this implementation we consider some independent categorical variables. Some usages include portfolio optimization, for exampled.

Examples

Some examples are available in https://github.com/VicentePerezSoloviev/EDAspy/tree/master/notebooks

Getting started

For installing EDAspy from Pypi execute the following command using pip:

    pip install EDAspy

Build from Source

Prerequisites

  • Python 3.6, 3.7, 3.8 or 3.9.
  • Pybnesian, numpy, pandas.

Building

Clone the repository:

    git clone https://github.com/VicentePerezSoloviev/EDAspy.git
    cd EDAspy
    git checkout v1.0.0 # You can checkout a specific version if you want
    python setup.py install

Testing

The library contains tests that can be executed using pytest <https://docs.pytest.org/>_. Install it using pip:

  pip install pytest

Run the tests with:

  pytest

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

EDAspy-1.0.1.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

EDAspy-1.0.1-py3-none-any.whl (37.5 kB view details)

Uploaded Python 3

File details

Details for the file EDAspy-1.0.1.tar.gz.

File metadata

  • Download URL: EDAspy-1.0.1.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.8

File hashes

Hashes for EDAspy-1.0.1.tar.gz
Algorithm Hash digest
SHA256 1f7ff186795ba821e19818ab6d471d29ec75a3bf8a1b99913834e0d3a7f0b57c
MD5 47d191a4ac842707c845eeee7d9fba8a
BLAKE2b-256 053ccc4823bf14c709f815a5c1e0004ccf0dd113916196c86911c723e5f14370

See more details on using hashes here.

Provenance

File details

Details for the file EDAspy-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: EDAspy-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 37.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.8

File hashes

Hashes for EDAspy-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ad74ffa8298849387c7db0454cfe7be72111621a155aba8d1b89a497883eac9d
MD5 dd19cf0f41c1c88eab5f5141528b615a
BLAKE2b-256 33e1551f3a50713c0b410e4f98ec9173b1f92b6f169453e55aa7e9208d9d8100

See more details on using hashes here.

Provenance

Supported by

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