Skip to main content

pateda — Python Algorithms for Estimation of Distribution Algorithms

PyPI version Python 3.9+ License: MIT

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.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pateda 0.2.2
File Size Uploaded
pateda-0.2.2.tar.gz 4.7 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for pateda 0.2.2
File Interpreter ABI Platform
pateda-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 9.5 MB

Release files / pateda-0.2.2.tar.gz

Download URL pateda-0.2.2.tar.gz
Size 4.7 MB
Tags Source
SHA-256 checksum
How to use checksums
637e00256db7b4a23c71eae53168c80ecabdd9cc94ff2ed5c13a0e07f9be7052
BLAKE2b-256 checksum
How to use checksums
b75548ab5e65ce87e906607ede1ce700da04754814bd9d65109c8616e88c7b8c
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 24, 2026.

Transparency log

Release files / pateda-0.2.2-py3-none-any.whl

Download URL pateda-0.2.2-py3-none-any.whl
Size 4.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
cc9f968d6671ad26e30e20b777744588b4f1d7347916922685e8c4a94c35b63e
BLAKE2b-256 checksum
How to use checksums
9c1911a6c9a8cbd2f5ba71c0e3cc51311a2e83480516090f714dc6964cfe286e
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 24, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.0

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page