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 |
| HBOA | LearnHBOA |
Binary |
| LFDA | LearnLFDA |
Binary |
| PADA | LearnPADA |
Binary |
| MN-FDA | LearnMNFDA / LearnMNFDAG |
Binary / integer |
| Tree-EDA | LearnTreeModel |
Binary / integer |
| Tree-EDA-M | LearnTreeModelM |
Binary / integer (malign interactions only) |
| Int_FDA | LearnIntFDA / SampleIntFDA |
Integer (high cardinality) |
| Mixture Trees | LearnMixtureTrees |
Binary |
| MIMIC | LearnMIMIC |
Binary |
| BSC | LearnBSC |
Binary |
| MOA | LearnMOA |
Multi-objective |
| MkRg-EDA | LearnRegularizedMarkov / SampleRegularizedMarkov |
Binary / integer (regularized k-order Markov) |
| 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 |
| Structure-guided | SampleNetworkCrossover, SubstructuralLocalSearch |
Network crossover & substructural search exploiting the learned model structure |
| Pipelines | pateda.pipelines |
Model operators (MODMOD/MODCONV) + a grammar that generates feasible EDA pipelines |
| 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 |
| Memetic Local Opt | DeterministicHillClimber, FirstImprovementHillClimber, StochasticHillClimber, SimulatedAnnealing, VariableNeighborhoodSearch, ReducedVariableNeighborhoodSearch |
Budget- & subset-aware local search (binary/integer) |
| 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.
Metadata
Release files for pateda 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pateda-0.2.4.tar.gz | 4.7 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pateda-0.2.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.6 MB
Release files / pateda-0.2.4.tar.gz
| Download URL | pateda-0.2.4.tar.gz |
|---|---|
| Size | 4.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
781cd53a8d863348a9624cd2c77ef0fbf2153a5e14679380ee78b89a7de12977
|
|
BLAKE2b-256 checksum How to use checksums |
c2ba489be4bd60c94732cea7a5d0a1b640cab4e5a64b2ce37b0b9a276c8ff267
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.
Transparency logRelease files / pateda-0.2.4-py3-none-any.whl
| Download URL | pateda-0.2.4-py3-none-any.whl |
|---|---|
| Size | 4.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
afb3676b462e81f8cde8a70dcd2479e6918209b6fff4229ac1427a89173d8330
|
|
BLAKE2b-256 checksum How to use checksums |
b88ee4455e2f3c32e6304066a98dee60ee9c8daef7ecef3c156a2fa848d7083c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.
Transparency log