eckity

EC-KitY: A scikit-learn-compatible Python tool kit for doing evolutionary computation.

https://github.com/ec-kity/ec-kity

Science Score: 64.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org, sciencedirect.com
  • Committers with academic emails
    4 of 11 committers (36.4%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.6%) to scientific vocabulary

Keywords

evolutionary-algorithms evolutionary-computation genetic-algorithms genetic-programming machine-learning python scikit-learn sklearn symbolic-regression
Last synced: 4 months ago · JSON representation ·

Repository

EC-KitY: A scikit-learn-compatible Python tool kit for doing evolutionary computation.

Basic Info
  • Host: GitHub
  • Owner: EC-KitY
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: develop
  • Homepage: https://www.eckity.org
  • Size: 4.88 MB
Statistics
  • Stars: 98
  • Watchers: 4
  • Forks: 19
  • Open Issues: 25
  • Releases: 10
Topics
evolutionary-algorithms evolutionary-computation genetic-algorithms genetic-programming machine-learning python scikit-learn sklearn symbolic-regression
Created about 4 years ago · Last pushed 12 months ago
Metadata Files
Readme License Citation

README.md

image PyPI

EC-KitY is a Python tool kit for doing evolutionary computation, and it is scikit-learn compatible.

Currently we have implemented Genetic Algorithm (GA) and tree-based Genetic Programming (GP), but EC-KitY will grow!

Join the community section

EC-KitY is: - A comprehensive toolkit for running evolutionary algorithms - Written in Python - Can work with or without scikit-learn, i.e., supports both sklearn and non-sklearn modes - Designed with modern software engineering in mind - Designed to support all popular EC paradigms (GA, GP, ES, coevolution, multi-objective, etc').

Dependencies

The minimal Python Version for EC-KitY is Python 3.8

The dependencies of our package are described in requirements.txt

For sklearn mode, EC-KitY additionally requires: - scikit-learn (>=1.1)

User installation

pip install eckity

Documentation

API is available here

(Work in progress - some modules and functions are not documented yet.)

Tutorials

The tutorials are available here, walking you through running EC-KitY both in sklearn mode and in non-sklearn mode.

Examples

More examples are in the examples folder. All you need to do is define a fitness-evaluation method, through a SimpleIndividualEvaluator sub-class. You can run the examples with ease by opening this colab notebook.

Basic example (no sklearn)

You can run an EA with just 3 lines of code. The problem being solved herein is simple symbolic regression.

Additional information on this problem can be found in the Symbolic Regression Tutorial. ```python from eckity.subpopulation import Subpopulation from eckity.algorithms import SimpleEvolution from eckity.base.untypedfunctions import fadd, fsub, fmul, fdiv from eckity.creators import FullCreator from eckity.geneticoperators import SubtreeCrossover, SubtreeMutation from examples.treegp.basicmode.symbolicregression import SymbolicRegressionEvaluator

algo = SimpleEvolution( Subpopulation( SymbolicRegressionEvaluator(), creators=FullCreator( terminalset=['x', 'y', 'z'], functionset=[fadd, fsub, fmul, fdiv] ), operators_sequence=[SubtreeCrossover(), SubtreeMutation()] ) ) algo.evolve() print(f'algo.execute(x=2,y=3,z=4): {algo.execute(x=2, y=3, z=4)}') ```

Example with sklearn

The problem being solved herein is the same problem, but in this case we also involve sklearn compatability - a core feature of EC-KitY. Additional information for this example can be found in the Sklearn Symbolic Regression Tutorial.

A simple sklearn-compatible EA run:

```python from sklearn.datasets import makeregression from sklearn.metrics import meanabsoluteerror from sklearn.modelselection import traintestsplit

from eckity.algorithms.simpleevolution import SimpleEvolution from eckity.base.untypedfunctions import fadd, fdiv, fmul, fsub from eckity.creators.gpcreators.full import FullCreator from eckity.geneticencodings.gp.tree.utils import createterminalset from eckity.geneticoperators import SubtreeCrossover, SubtreeMutation from eckity.sklearncompatible.regressionevaluator import RegressionEvaluator from eckity.sklearncompatible.sk_regressor import SKRegressor from eckity.subpopulation import Subpopulation

X, y = makeregression(nsamples=100, nfeatures=3) terminalset = createterminalset(X) functionset = [fadd, fsub, fmul, f_div]

algo = SimpleEvolution( Subpopulation( RegressionEvaluator(), creators=FullCreator( terminalset=terminalset, functionset=functionset ), operators_sequence=[SubtreeCrossover(), SubtreeMutation()] ) ) regressor = SKRegressor(algo)

Xtrain, Xtest, ytrain, ytest = traintestsplit(X, y, testsize=0.2) regressor.fit(Xtrain, ytrain) print('MAE on test set:', meanabsoluteerror(ytest, regressor.predict(X_test))) ```

Feature comparison

Here's a comparison table. The full paper is available here. image

Authors

Moshe Sipper, Achiya Elyasaf, Itai Tzruia, Tomer Halperin

Citation

Citations are always appreciated 😊: ``` @article{eckity2023, author = {Moshe Sipper and Tomer Halperin and Itai Tzruia and Achiya Elyasaf}, title = {{EC-KitY}: Evolutionary computation tool kit in {Python} with seamless machine learning integration}, journal = {SoftwareX}, volume = {22}, pages = {101381}, year = {2023}, url = {https://www.sciencedirect.com/science/article/pii/S2352711023000778}, }

@misc{eckity2022git, author = {Sipper, Moshe and Halperin, Tomer and Tzruia, Itai and Elyasaf, Achiya}, title = {{EC-KitY}: Evolutionary Computation Tool Kit in {Python}}, year = {2022}, publisher = {GitHub}, journal = {GitHub repository}, howpublished = {\url{https://www.eckity.org/} } }

```

Sample repos using EC-KitY

Owner

  • Name: EC-KitY
  • Login: EC-KitY
  • Kind: organization
  • Location: Israel

Evolutionary Computation Tool Kit in Python

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: EC-KitY
message: 'If you use this software, please cite it as below.'
type: software
authors:
  - given-names: Moshe
    family-names: Sipper
    email: sipper@bgu.ac.il
    orcid: 'https://orcid.org/0000-0003-1811-472X'
    affiliation: Ben-Gurion University
  - given-names: Tomer
    family-names: Halperin
    email: tomerhal@post.bgu.ac.il
    affiliation: Ben-Gurion University
  - given-names: Itai
    family-names: Tzruia
    email: itaitz@post.bgu.ac.il
    affiliation: Ben-Gurion University
  - given-names: Achiya
    family-names: Elyasaf
    email: achiya@bgu.ac.il
    affiliation: Ben-Gurion University
    orcid: 'https://orcid.org/0000-0002-4009-5353'
identifiers:
  - type: doi
    value: 10.1016/j.softx.2023.101381
repository-code: 'https://github.com/EC-KitY/EC-KitY'
url: 'https://www.eckity.org/'
abstract: >-
  EC-KitY is a comprehensive Python library for doing
  evolutionary computation (EC), licensed under the BSD
  3-Clause License, and compatible with scikit-learn.
  Designed with modern software engineering and machine
  learning integration in mind, EC-KitY can support all
  popular EC paradigms, including genetic algorithms,
  genetic programming, coevolution, evolutionary
  multi-objective optimization, and more. This paper
  provides an overview of the package, including the ease of
  setting up an EC experiment, the architecture, the main
  features, and a comparison with other libraries.
keywords:
  - Evolutionary algorithms
  - Evolutionary computation
  - Genetic programming
  - Machine learning
  - Scikit-learn
license: BSD-3-Clause
preferred-citation:
  authors:
    - given-names: Moshe
      family-names: Sipper
      email: sipper@bgu.ac.il
      orcid: 'https://orcid.org/0000-0003-1811-472X'
      affiliation: Ben-Gurion University
    - given-names: Tomer
      family-names: Halperin
      email: tomerhal@post.bgu.ac.il
      affiliation: Ben-Gurion University
    - given-names: Itai
      family-names: Tzruia
      email: itaitz@post.bgu.ac.il
      affiliation: Ben-Gurion University
    - given-names: Achiya
      family-names: Elyasaf
      email: achiya@bgu.ac.il
      affiliation: Ben-Gurion University
      orcid: 'https://orcid.org/0000-0002-4009-5353'
  title: "EC-KitY: Evolutionary computation tool kit in Python with seamless machine learning integration"
  type: article
  year: 2023
  journal: SoftwareX
  volume: 22
  pages: 101381
  doi: 10.1016/j.softx.2023.101381

GitHub Events

Total
  • Create event: 8
  • Release event: 3
  • Issues event: 9
  • Watch event: 5
  • Delete event: 1
  • Issue comment event: 59
  • Push event: 92
  • Pull request review event: 3
  • Pull request event: 12
  • Fork event: 1
Last Year
  • Create event: 8
  • Release event: 3
  • Issues event: 9
  • Watch event: 5
  • Delete event: 1
  • Issue comment event: 59
  • Push event: 92
  • Pull request review event: 3
  • Pull request event: 12
  • Fork event: 1

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 458
  • Total Committers: 11
  • Avg Commits per committer: 41.636
  • Development Distribution Score (DDS): 0.234
Past Year
  • Commits: 217
  • Committers: 4
  • Avg Commits per committer: 54.25
  • Development Distribution Score (DDS): 0.115
Top Committers
Name Email Commits
itaitzruia4 i****z@p****l 351
Moshe Sipper s****r@g****m 22
Achiya Elyasaf 1****e 22
Zvika Haramaty h****a@g****m 13
Achiya Elyasaf 1****o 13
tomerhal t****l@p****l 13
Ron r****f@p****l 12
ohads o****t@g****m 9
lior l****g@g****m 1
jack-powers j****s@c****u 1
eliadsbgu 3****u 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 58
  • Total pull requests: 83
  • Average time to close issues: 6 months
  • Average time to close pull requests: 2 months
  • Total issue authors: 10
  • Total pull request authors: 12
  • Average comments per issue: 0.5
  • Average comments per pull request: 2.39
  • Merged pull requests: 68
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 4
  • Pull requests: 9
  • Average time to close issues: N/A
  • Average time to close pull requests: 24 days
  • Issue authors: 3
  • Pull request authors: 1
  • Average comments per issue: 0.75
  • Average comments per pull request: 6.56
  • Merged pull requests: 6
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • itaitzruia4 (39)
  • tomerhal (6)
  • achiyae (4)
  • ori86 (2)
  • MohammadSoltani100 (1)
  • zahidirfan (1)
  • JJ (1)
  • eliadsbgu (1)
  • shiyuan (1)
  • ZvikaZ (1)
Pull Request Authors
  • itaitzruia4 (73)
  • ZvikaZ (20)
  • OhadSharet (6)
  • yonatanaftali (2)
  • gallorob (2)
  • irenamal (2)
  • eliadsbgu (2)
  • achiyae (2)
  • RonShef (2)
  • jack-powers (1)
  • lior8 (1)
  • tomerhal (1)
Top Labels
Issue Labels
enhancement (11) help wanted (6) good first issue (5) design (3) documentation (3) triage (2) bug (1) invalid (1)
Pull Request Labels
enhancement (3) design (2)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 71 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 1
  • Total versions: 10
  • Total maintainers: 1
pypi.org: eckity

EC-KitY: Evolutionary Computation Tool Kit in Python.

  • Versions: 10
  • Dependent Packages: 1
  • Dependent Repositories: 1
  • Downloads: 71 Last month
Rankings
Dependent packages count: 4.8%
Stargazers count: 8.0%
Forks count: 8.5%
Average: 13.4%
Dependent repos count: 21.6%
Downloads: 24.2%
Maintainers (1)
Last synced: 5 months ago

Dependencies

requirements.txt pypi
  • numpy >=1.14.6
  • overrides >=6.1.0
  • pandas >=0.25.0
setup.py pypi
  • numpy >=1.14.6
  • overrides >=6.1.0
  • pandas >=0.25.0
.github/workflows/pylint.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
.github/workflows/python-package.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
.github/workflows/python-publish.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
  • pypa/gh-action-pypi-publish 27b31702a0e7fc50959f5ad993c78deac1bdfc29 composite
.github/workflows/test-python-publish.yml actions
  • actions/checkout master composite
  • actions/setup-python v1 composite
  • pypa/gh-action-pypi-publish master composite