Python Algorithms for Estimation of Distribution Algorithms
Project description
pateda — Python Algorithms for Estimation of Distribution Algorithms
pateda is a comprehensive Python library for Estimation of Distribution Algorithms (EDAs) supporting discrete, integer, continuous, and permutation-based optimization. It is a clean, PyPI-ready package extracted from the PATEDA research framework developed at the University of the Basque Country (EHU/UPV).
Features
Classical discrete EDAs
| Algorithm | Class / function | Problem type |
|---|---|---|
| UMDA | LearnUMDA / SampleFDA |
Binary / integer |
| PBIL | LearnPBIL |
Binary |
| FDA | LearnFDA / SampleFDA |
Binary / integer |
| CFDA | LearnCFDA / SampleCFDA |
Binary |
| CUMDA | LearnCUMDA / SampleCUMDA |
Binary |
| BMDA | LearnBMDA |
Binary |
| EBNA | LearnEBNA |
Binary |
| BOA | LearnBOA |
Binary |
| MN-FDA | LearnMNFDA / LearnMNFDAG |
Binary / integer |
| Tree-EDA | LearnTreeModel |
Binary / integer |
| Mixture Trees | LearnMixtureTrees |
Binary |
| MIMIC | LearnMIMIC |
Binary |
| BSC | LearnBSC |
Binary |
| MOA | LearnMOA |
Multi-objective |
| Affinity | LearnAffinityFactorization |
Binary |
| Markov | LearnMarkovChain |
Sequences |
Continuous EDAs
| Algorithm | Learning | Sampling |
|---|---|---|
| Gaussian Univariate (UMDA-G) | learn_gaussian_univariate |
sample_gaussian_univariate |
| Gaussian Full (EMNA) | learn_gaussian_full |
sample_gaussian_full |
| Mixture of Gaussians | learn_mixture_gaussian_* |
sample_mixture_gaussian_* |
| GMRF-EDA | learn_gmrf_eda* |
sample_gmrf_eda |
| Vine Copula EDA (optional) | learned automatically | sample_vine_copula |
Permutation EDAs
| Algorithm | Learning | Sampling |
|---|---|---|
| Mallows EDA (Kendall) | LearnMallowsKendall |
SampleMallowsKendall |
| EHM / NHM | LearnEHM / LearnNHM |
SampleEHM / SampleNHM |
Supporting components
| Component | Subpackage | Notes |
|---|---|---|
| Selection | pateda.selection |
Truncation, tournament, Boltzmann, SUS, proportional, ranking, non-dominated |
| Mutation | pateda.mutation |
Bit-flip, frequency-balance |
| Crossover | pateda.crossover |
Block, two-point, transposition |
| Seeding | pateda.seeding |
Random, biased, constrained |
| Replacement | pateda.replacement |
Elitist, generational |
| Repairing | pateda.repairing |
Unitation, trigonometric, bounds |
| Local Opt | pateda.local_optimization |
Greedy search, simulated annealing, scipy wrapper |
| Stop cond. | pateda.stop_conditions |
Max generations, optimum found |
| Statistics | pateda.statistics |
Per-generation tracking, population stats |
| Knowledge | pateda.knowledge_extraction |
Dependency analysis, MI, model visualization |
Benchmark functions
Discrete: OneMax, Deceptive-3, Trap, NK-landscape, SAT, UBQP, Ising, HP-Protein, Additive Decomposable, Contiguous Block
Continuous: Sphere, Rosenbrock, Rastrigin, Ackley, GNBG instances
Permutation: TSP, LOP, QAP
Installation
pip install pateda
Optional extras:
pip install "pateda[copula]" # vine-copula EDAs (pyvinecopulib)
pip install "pateda[dev]" # development tools
pip install "pateda[all]" # everything
For neural-network-based EDAs (VAE, GAN, Diffusion, etc.) install the companion package:
pip install pateda-nn
Quick start
import numpy as np
from pateda import EDA, EDAComponents
from pateda.seeding import RandomInit
from pateda.learning import LearnUMDA
from pateda.sampling import SampleFDA
from pateda.selection import TruncationSelection
from pateda.stop_conditions import MaxGenerations
from pateda.functions.discrete.onemax import onemax
n_vars = 50
cardinality = np.full(n_vars, 2)
components = EDAComponents(
seeding=RandomInit(),
learning=LearnUMDA(),
sampling=SampleFDA(),
selection=TruncationSelection(),
stop_condition=MaxGenerations(max_gen=100),
selection_params={"selection_size": 150},
)
eda = EDA(
pop_size=300,
n_vars=n_vars,
fitness_func=onemax,
cardinality=cardinality,
components=components,
random_seed=42,
)
stats, cache = eda.run()
print(f"Best: {stats.best_fitness_overall}")
See examples/ for more complete demos covering discrete, continuous, permutation, and multi-objective problems.
Project structure
pateda/
├── src/
│ └── pateda/
│ ├── core/ # EDA engine (EDA, EDAComponents, Model)
│ ├── learning/ # Probabilistic model learning
│ ├── sampling/ # Model-based sampling
│ ├── selection/ # Selection operators
│ ├── seeding/ # Population initialisation
│ ├── mutation/ # Mutation operators
│ ├── crossover/ # Crossover operators
│ ├── replacement/ # Replacement strategies
│ ├── repairing/ # Constraint repair
│ ├── stop_conditions/# Termination criteria
│ ├── local_optimization/ # Local search wrappers
│ ├── functions/ # Benchmark objective functions
│ ├── inference/ # MAP inference
│ ├── statistics/ # Run-time statistics
│ └── knowledge_extraction/ # Model analysis tools
├── tests/
├── examples/
├── pyproject.toml
└── README.md
Citation
If you use pateda in academic work, please cite:
@misc{pateda,
author = {Roberto Santana},
title = {pateda: Python Algorithms for Estimation of Distribution Algorithms},
year = {2024},
url = {https://github.com/rsantana-isg/pateda},
}
License
MIT — see LICENSE.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pateda-0.1.0.tar.gz.
File metadata
- Download URL: pateda-0.1.0.tar.gz
- Upload date:
- Size: 3.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a77a11a965a04619314c5443488c7a2f2052f82af4917556eb16ba604acabd42
|
|
| MD5 |
352c045e32beb3363e2b2a72a9070d9a
|
|
| BLAKE2b-256 |
b018740b0c4c5e090cec4926c01185dab48f752a8c3600ae17e439d9e86c634a
|
Provenance
The following attestation bundles were made for pateda-0.1.0.tar.gz:
Publisher:
publish.yml on rsantana-isg/pateda
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pateda-0.1.0.tar.gz -
Subject digest:
a77a11a965a04619314c5443488c7a2f2052f82af4917556eb16ba604acabd42 - Sigstore transparency entry: 2039573946
- Sigstore integration time:
-
Permalink:
rsantana-isg/pateda@fc98130885968fac7fc2fa2a4622003586dd1470 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/rsantana-isg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fc98130885968fac7fc2fa2a4622003586dd1470 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pateda-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pateda-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c52014714bf9f477ca7653c4e114013218aeced9354473cc9a8d279b3e7f63b
|
|
| MD5 |
c438de2ebfa5c68af5014b35557461f3
|
|
| BLAKE2b-256 |
df500a59450285aeeba1485b3808fc8da3e2f3b49d63008dafce554e1677d427
|
Provenance
The following attestation bundles were made for pateda-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on rsantana-isg/pateda
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pateda-0.1.0-py3-none-any.whl -
Subject digest:
7c52014714bf9f477ca7653c4e114013218aeced9354473cc9a8d279b3e7f63b - Sigstore transparency entry: 2039574112
- Sigstore integration time:
-
Permalink:
rsantana-isg/pateda@fc98130885968fac7fc2fa2a4622003586dd1470 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/rsantana-isg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fc98130885968fac7fc2fa2a4622003586dd1470 -
Trigger Event:
push
-
Statement type: