EvoDAG
Evolving Directed Acyclic Graph (EvoDAG) is a steady-state Genetic Programming system with tournament selection (for classification, the default parameters choose the arguments and the individual that leaves at random; see the documentation). The main characteristic of EvoDAG is that the genetic operation is performed at the root. EvoDAG was inspired by the geometric semantic crossover proposed by Alberto Moraglio et al. and the implementation performed by Leonardo Vanneschi et al.
EvoDAG is described in two papers. The preferred reference is Selection Heuristics on Semantic Genetic Programming for Classification Problems, Claudia N. Sánchez and Mario Graff, Evolutionary Computation 30(2):253–289, 2022; the library is presented in EvoDAG: A semantic Genetic Programming Python library, Mario Graff, Eric S. Tellez, Sabino Miranda-Jiménez, Hugo Jair Escalante, 2016 IEEE International Autumn Meeting on Power, Electronics and Computing (ROPEC), pp 1-6.
Documentation: the user guide is at https://mgraffg.github.io/EvoDAG/: installation, using EvoDAG from Python and from the command line, how the method works, the parameters, the performance results and how to cite it.
Quick Start
There are two options to use EvoDAG, one is as a library and the other is using the command line interface.
Using EvoDAG as library
EvoDAG offers scikit-learn estimators, which need the optional dependency scikit-learn:
pip install 'EvoDAG[sklearn]'
Let us assume that X contains the inputs and y contains the
classes. Then in order to train an ensemble of 30 EvoDAG and predict
X one uses the following instructions:
# Importing the EvoDAG ensemble (scikit-learn interface)
from EvoDAG import EnsembleClassifier, EvoDAGClassifier
# Importing iris dataset from sklearn
from sklearn.datasets import load_iris
# Reading data
data = load_iris()
X = data.data
y = data.target
# train the model: 30 EvoDAG models, seeds 0 to 29
m = EnsembleClassifier(EvoDAGClassifier(), n_estimators=30, n_jobs=4).fit(X, y)
# predict X using the model
hy = m.predict(X)
EvoDAGClassifier alone is one model, and EvoDAGRegressor and
EnsembleRegressor are their counterparts for regression. EvoDAG's own
classes (EvoDAGE, the search engine EvoDAG.EvoDAG, Model and Ensemble)
do not need scikit-learn; they are described in the
Native API page.
Using EvoDAG from the command line
Let us assume one wants to create a classifier of iris dataset. The first step is to download the dataset from the UCI Machine Learning Repository
curl -O https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data
Training EvoDAG
Let us assume, you do not want to optimise the EvoDAG parameters, so the
default parameters are used when flag -P is not present, i.e.,
EvoDAG-train -C -m model.evodag -n 100 -u 4 iris.data
-C flag indicates that it is a classification problem, and
-R is for regression problems; there are different default parameters
for each type of problems.
The performance of EvoDAG without optimising the parameters is presented in the Performance page of the documentation.
Predict
Once the model is obtained, it is time to use it; given that iris.data
was not split into a training and test set, let us assume
that iris.data contains some unknown data.
In order to predict iris.data one would do:
EvoDAG-predict -m model.evodag -o iris.predicted iris.data
where -o indicates the file name used to store the predictions, -m
contains the model, and iris.data is the test set.
Performance
On 30 classification problems the default EvoDAG, an ensemble of 30 models, is
fourth of 37 systems (the 21 EvoDAG configurations and 16 classifiers of
scikit-learn) in average rank of the macro-F1. Of the classifiers of
scikit-learn only ExtraTrees ranks ahead of it, RandomForest and
GradientBoosting are level with it and the other 13 are behind, and it is
slower to train than all of them. The
Performance page has
the tables.
Development
The development guide is CLAUDE.md (architecture, commands, rules and
conventions), and the developer reference, with every module documented, is at
https://mgraffg.github.io/EvoDAG/dev/.
Citing EvoDAG
If EvoDAG is used in a scientific publication, I would appreciate a citation
to the first paper below (the preferred one); the conference paper and the book
chapter describe the library and the earlier system. The same information is
in CITATION.cff
and on the Citing page.
Selection Heuristics on Semantic Genetic Programming for Classification Problems Claudia N. Sánchez, Mario Graff. Evolutionary Computation 30(2):253–289, 2022.
@article{sanchez_selection_2022,
title = {Selection {Heuristics} on {Semantic} {Genetic} {Programming} for {Classification} {Problems}},
author = {S{\'a}nchez, Claudia N. and Graff, Mario},
journal = {Evolutionary Computation},
volume = {30},
number = {2},
pages = {253--289},
year = {2022},
doi = {10.1162/evco_a_00297}
}
EvoDAG: A semantic Genetic Programming Python library Mario Graff, Eric S. Tellez, Sabino Miranda-Jiménez, Hugo Jair Escalante. 2016 IEEE International Autumn Meeting on Power, Electronics and Computing (ROPEC) pp 1-6.
@inproceedings{graff_evodag:_2016,
title = {{EvoDAG}: {A} semantic {Genetic} {Programming} {Python} library},
shorttitle = {{EvoDAG}},
doi = {10.1109/ROPEC.2016.7830633},
abstract = {Genetic Programming (GP) is an evolutionary algorithm that has received a lot of attention lately due to its success in solving hard real-world problems. Lately, there has been considerable interest in GP's community to develop semantic genetic operators, i.e., operators that work on the phenotype. In this contribution, we describe EvoDAG (Evolving Directed Acyclic Graph) which is a Python library that implements a steady-state semantic Genetic Programming with tournament selection using an extension of our previous crossover operators based on orthogonal projections in the phenotype space. To show the effectiveness of EvoDAG, it is compared against state-of-the-art classifiers on different benchmark problems, experimental results indicate that EvoDAG is very competitive.},
booktitle = {2016 {IEEE} {International} {Autumn} {Meeting} on {Power}, {Electronics} and {Computing} ({ROPEC})},
author = {Graff, M. and Tellez, E. S. and Miranda-Jiménez, S. and Escalante, H. J.},
month = nov,
year = {2016},
keywords = {directed graphs, Electronic mail, EvoDAG, evolving directed acyclic graph, Genetic algorithms, GP community, Libraries, semantic genetic operators, semantic genetic programming Python library, Semantics, Sociology, Statistics, Steady-state, steady-state semantic genetic programming, Training},
pages = {1--6}
}
Semantic Genetic Programming for Sentiment Analysis Mario Graff, Eric S. Tellez, Hugo Jair Escalante, Sabino Miranda-Jiménez. NEO 2015 Volume 663 of the series Studies in Computational Intelligence pp 43-65.
@incollection{graff_semantic_2017,
series = {Studies in {Computational} {Intelligence}},
title = {Semantic {Genetic} {Programming} for {Sentiment} {Analysis}},
copyright = {©2017 Springer International Publishing Switzerland},
isbn = {9783319440026 9783319440033},
url = {https://doi.org/10.1007/978-3-319-44003-3_2},
abstract = {Sentiment analysis is one of the most important tasks in text mining. This field has a high impact for government and private companies to support major decision-making policies. Even though Genetic Programming (GP) has been widely used to solve real world problems, GP is seldom used to tackle this trendy problem. This contribution starts rectifying this research gap by proposing a novel GP system, namely, Root Genetic Programming, and extending our previous genetic operators based on projections on the phenotype space. The results show that these systems are able to tackle this problem being competitive with other state-of-the-art classifiers, and, also, give insight to approach large scale problems represented on high dimensional spaces.},
language = {en},
number = {663},
urldate = {2016-09-20},
booktitle = {{NEO} 2015},
publisher = {Springer International Publishing},
author = {Graff, Mario and Tellez, Eric S. and Escalante, Hugo Jair and Miranda-Jiménez, Sabino},
editor = {Schütze, Oliver and Trujillo, Leonardo and Legrand, Pierrick and Maldonado, Yazmin},
year = {2017},
note = {DOI: 10.1007/978-3-319-44003-3\_2},
keywords = {Artificial Intelligence (incl. Robotics), Big Data/Analytics, Computational intelligence, Computer Imaging, Vision, Pattern Recognition and Graphics, Genetic programming, optimization, Semantic Crossover, sentiment analysis, Text mining},
pages = {43--65}
}
Where to find the rest
- Command line: the four
console commands with every option and the data formats, including the
random search on the parameter space (
EvoDAG-params). - Parameters: what each parameter does, its default, and the space that the random search explores.
- How it works and Selection: the method and the selection heuristics.
Install EvoDAG
- Installing
evodagfrom theconda-forgechannel can be achieved by addingconda-forgeto your channels with:
conda config --add channels conda-forge
conda config --set channel_priority strict
conda install evodag
or with mamba:
mamba install evodag
- Install using pip
pip install EvoDAG
The page Install lists the requirements and how to build the package from its source code.
Metadata
Release files for EvoDAG 0.19.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| evodag-0.19.0.tar.gz | 650.5 kB | Without provenance | Details for evodag-0.19.0.tar.gz |
Built distributions (wheels)
Total release size: 17.3 MB
Release files / evodag-0.19.0.tar.gz
| Download URL | evodag-0.19.0.tar.gz |
|---|---|
| Size | 650.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d78ef4a4826911d17fae4fced85c37ad4894d1848281a1a24ab9163bc7d4996b
|
|
BLAKE2b-256 checksum How to use checksums |
dae6532bc8217a813673223736e62ced3f5c1440be5d65484030f98982b9e184
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / evodag-0.19.0-cp315-cp315-win_amd64.whl
| Download URL | evodag-0.19.0-cp315-cp315-win_amd64.whl |
|---|---|
| Size | 407.2 kB |
| Tags | CPython 3.15 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
4e368a7c3e8e11b98c7d883683ab73e3cf36d2c262f1ff9a0cfa0cdc13b89281
|
|
BLAKE2b-256 checksum How to use checksums |
b25a4985ad520cf7d873a062fb2da4e7398fed29e2b2a8ca1e3fc43ff57e750a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / evodag-0.19.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | evodag-0.19.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.15 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
6355c5eed9d6f9191f987ccc2178cfeabda0b5a76be6cc91a4b01f22acc2accd
|
|
BLAKE2b-256 checksum How to use checksums |
049c5334d71c9c6aeed72d510bf0599bcc8aec7f1a53e3b772da19e775245ed4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / evodag-0.19.0-cp315-cp315-macosx_11_0_arm64.whl
| Download URL | evodag-0.19.0-cp315-cp315-macosx_11_0_arm64.whl |
|---|---|
| Size | 458.4 kB |
| Tags | CPython 3.15 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
b8532e3e9faedbc03375b3210cd1afbfb02c88146ad1801bde6a239b67d8e27c
|
|
BLAKE2b-256 checksum How to use checksums |
04c9a83b9f9b0ca3865ef0ed7afd83798868a2d2064bc9924f03c73d69596734
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / evodag-0.19.0-cp314-cp314-win_amd64.whl
| Download URL | evodag-0.19.0-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 407.2 kB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
7f5cd831778d6781313e498b623b2e1a885ee2f0cfec7c9ce7de4e75f081ac81
|
|
BLAKE2b-256 checksum How to use checksums |
12ae434f642f2d7ef85d6eedf99f2d8d7e5c32a87ea99bcd181143bf81cfb132
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / evodag-0.19.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | evodag-0.19.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.14 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
791bd001c61e484faf6eb3e1582001bd1cc6f3ae6993b698497282d5d7fe3b57
|
|
BLAKE2b-256 checksum How to use checksums |
38810433067a5c7dc332eff01e7ab5183a608a1f8e913b392b3dcf9fc983cbb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / evodag-0.19.0-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | evodag-0.19.0-cp314-cp314-macosx_11_0_arm64.whl |
|---|---|
| Size | 459.1 kB |
| Tags | CPython 3.14 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
6d07eb5a43dc779b4a5fa2283e1473415268e2dab39ed8fbc269bbab801c2c6b
|
|
BLAKE2b-256 checksum How to use checksums |
4d35fe21cb8de21e82582c865e821bff20ee1ead82aabca0b4a601dbb58efa39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / evodag-0.19.0-cp313-cp313-win_amd64.whl
| Download URL | evodag-0.19.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 394.8 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
84b6e977df5538f6362faf313b9ad75123270cd7c72ee7a44e14a70d4d2dfd72
|
|
BLAKE2b-256 checksum How to use checksums |
83d9bb8a71c30b82d4d67efabb9a093b999dbf8ac6ae4d07bbe6967c90128bdb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / evodag-0.19.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | evodag-0.19.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
3d5bdb83050e30cf5c1db34a0fe072521bc9409761717355f8429bc3ca2debd1
|
|
BLAKE2b-256 checksum How to use checksums |
12d70981b33f9b53a12e78b5cb0b9da4f7e05b2873ee2a644648ed12eaafd8e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / evodag-0.19.0-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | evodag-0.19.0-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 457.8 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
43a8a5ce27a1c89fd95c21941d37a469842c62619fb1a6fdc69c41c9ee706714
|
|
BLAKE2b-256 checksum How to use checksums |
14c2b24fe6139e2ffa2daee9375e2301a7cbaff47e7265c599e36936a8ce8163
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / evodag-0.19.0-cp312-cp312-win_amd64.whl
| Download URL | evodag-0.19.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 396.0 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
9e7eff7fb31672ea2b84eb9d9ae042254b1adf47ae27a799d5312ca3948495d7
|
|
BLAKE2b-256 checksum How to use checksums |
20970c03361624ec4557bdf0f2cd6511bec17c3f0512dae4c4c4c21f8889ab94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / evodag-0.19.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | evodag-0.19.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
bb5c43dd46124f9a0c7170783528433903b026b29739970531221a4d376a6c90
|
|
BLAKE2b-256 checksum How to use checksums |
437fb9bacf2032ed4ce2db7d31e2ed21e70a488799077b715d8332fc61733c3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / evodag-0.19.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | evodag-0.19.0-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 457.9 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
2a0c94883d8d0218e26cad5a17ad49fc18e4e529b4ebe87cfc3423f1183c9c94
|
|
BLAKE2b-256 checksum How to use checksums |
4739d8c9f1632297750098cb27f9da0e220b66535ca576afc5da90bb88612221
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / evodag-0.19.0-cp311-cp311-win_amd64.whl
| Download URL | evodag-0.19.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 397.8 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
1c8f594a16d4a15f15acc72cb0891977afe073669e5337fcd96cadbd91da7f14
|
|
BLAKE2b-256 checksum How to use checksums |
6c9ce72b4dde9b8d5e29debac9cb133c6c7495a7686a4c2e36f6962037065841
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / evodag-0.19.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | evodag-0.19.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
cfb1ba411d23a637f624cfd5a6a724323abf16db3d78c6110a132d53a628faf5
|
|
BLAKE2b-256 checksum How to use checksums |
545c74157337d8db9f619ee7ff1a265dd794d348bd4b4eb67872c9d8abd95acd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / evodag-0.19.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | evodag-0.19.0-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 454.4 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a98ac3ffd361e944425ed77c1c0db3a6fb348b6245c2d20919ad2e6a08d4a24b
|
|
BLAKE2b-256 checksum How to use checksums |
ae5c51b1f9d69a393275073697595d550df98f3055fc34f7cde1afcdbded910c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Security for EvoDAG 0.19.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.