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
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:
-
Random initialization of the population.
-
Evaluate each individual of the population.
-
Select the top best individuals according to cost function evaluation.
-
Learn a probabilistic model from the best individuals selected.
-
Sampled another population.
-
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file EDAspy-1.0.0.tar.gz
.
File metadata
- Download URL: EDAspy-1.0.0.tar.gz
- Upload date:
- Size: 22.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aaac5b981a3d62aaa56515d1ed5997c9777ff132965ac55163b302b7e4b89e56 |
|
MD5 | 7dd158822db5e525b67e687461a98a79 |
|
BLAKE2b-256 | 4f8cecbc4099f6744cac8c19b1d49591ac45e2d4410866ba67ba8de7294c2350 |
Provenance
File details
Details for the file EDAspy-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: EDAspy-1.0.0-py3-none-any.whl
- Upload date:
- Size: 37.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 897961bf32cf6247c75186c3e9c00089efe2baf7609e6c0a3e1f11f3385d4b16 |
|
MD5 | 93c3d892ec8db13b15c9093b078a1701 |
|
BLAKE2b-256 | 2065ec060b901639ba29110ac440bb97becbb95989de6e78cb86f0d32f8c2b90 |