{"id":14958331,"url":"https://github.com/ec-kity/ec-kity","last_synced_at":"2025-04-04T10:04:10.018Z","repository":{"id":39237440,"uuid":"433089720","full_name":"EC-KitY/EC-KitY","owner":"EC-KitY","description":"EC-KitY: A scikit-learn-compatible Python tool kit for doing evolutionary computation.","archived":false,"fork":false,"pushed_at":"2025-01-30T17:29:22.000Z","size":5118,"stargazers_count":93,"open_issues_count":25,"forks_count":18,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2025-04-04T09:37:37.275Z","etag":null,"topics":["evolutionary-algorithms","evolutionary-computation","genetic-algorithms","genetic-programming","machine-learning","python","scikit-learn","sklearn","symbolic-regression"],"latest_commit_sha":null,"homepage":"https://www.eckity.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EC-KitY.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-29T15:09:42.000Z","updated_at":"2024-12-28T15:14:37.000Z","dependencies_parsed_at":"2024-05-19T16:27:19.957Z","dependency_job_id":"9619f378-b25d-4215-b3f6-069241a91220","html_url":"https://github.com/EC-KitY/EC-KitY","commit_stats":{"total_commits":344,"total_committers":12,"mean_commits":"28.666666666666668","dds":"0.47965116279069764","last_synced_commit":"09affc83b16d72c9baa7f4eb081d4590f8fa3d8a"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EC-KitY%2FEC-KitY","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EC-KitY%2FEC-KitY/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EC-KitY%2FEC-KitY/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EC-KitY%2FEC-KitY/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EC-KitY","download_url":"https://codeload.github.com/EC-KitY/EC-KitY/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247157280,"owners_count":20893220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["evolutionary-algorithms","evolutionary-computation","genetic-algorithms","genetic-programming","machine-learning","python","scikit-learn","sklearn","symbolic-regression"],"created_at":"2024-09-24T13:16:47.242Z","updated_at":"2025-04-04T10:04:09.990Z","avatar_url":"https://github.com/EC-KitY.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![image](https://user-images.githubusercontent.com/62753120/163423530-1c85e43f-48a9-4fbd-827e-f97a1f174db0.png)\n![PyPI](https://img.shields.io/pypi/v/eckity)\n\n\n**EC-KitY** is a Python tool kit for doing evolutionary computation, and it is scikit-learn compatible.\n\nCurrently we have implemented Genetic Algorithm (GA) and tree-based Genetic Programming (GP), but EC-KitY will grow!\n\n[Join the community section](https://chat.eckity.org)\n\n**EC-KitY** is:\n- A comprehensive toolkit for running evolutionary algorithms\n- Written in Python\n- Can work with or without scikit-learn, i.e., supports both sklearn and non-sklearn modes\n- Designed with modern software engineering in mind\n- Designed to support all popular EC paradigms (GA, GP, ES, coevolution, multi-objective, etc').\n\n### Dependencies\nThe minimal Python Version for EC-KitY is Python 3.8\n\nThe dependencies of our package are described in `requirements.txt` \n\nFor sklearn mode, EC-KitY additionally requires:\n- scikit-learn (\u003e=1.1)\n\n### User installation\n\n`pip install eckity`\n\n### Documentation\n\nAPI is available [here](https://api.eckity.org)\n\n(Work in progress - some modules and functions are not documented yet.)\n\n### Tutorials\nThe tutorials are available [here](https://github.com/EC-KitY/EC-KitY/wiki/Tutorials), walking you through running EC-KitY both in sklearn mode and in non-sklearn mode.\n\n### Examples\nMore examples are in the [examples](https://github.com/EC-KitY/EC-KitY/tree/main/examples \"examples\") folder.\nAll you need to do is define a fitness-evaluation method, through a `SimpleIndividualEvaluator` sub-class.\nYou can run the examples with ease by opening this [colab notebook](https://colab.research.google.com/drive/1mpr3EGb1rpoK-_zugszQkv1sWVm-ZQiB?usp=sharing).\n\n### Basic example (no sklearn)\nYou can run an EA with just 3 lines of code. The problem being solved herein is simple symbolic regression.\n\nAdditional information on this problem can be found in the [Symbolic Regression Tutorial](https://github.com/EC-KitY/EC-KitY/wiki/Tutorial:-Symbolic-Regression).\n```python\nfrom eckity.subpopulation import Subpopulation\nfrom eckity.algorithms import SimpleEvolution\nfrom eckity.base.untyped_functions import f_add, f_sub, f_mul, f_div\nfrom eckity.creators import FullCreator\nfrom eckity.genetic_operators import SubtreeCrossover, SubtreeMutation\nfrom examples.treegp.basic_mode.symbolic_regression import SymbolicRegressionEvaluator\n\nalgo = SimpleEvolution(\n    Subpopulation(\n        SymbolicRegressionEvaluator(),\n        creators=FullCreator(\n            terminal_set=['x', 'y', 'z'],\n            function_set=[f_add, f_sub, f_mul, f_div]\n        ),\n        operators_sequence=[SubtreeCrossover(), SubtreeMutation()]\n    )\n)\nalgo.evolve()\nprint(f'algo.execute(x=2,y=3,z=4): {algo.execute(x=2, y=3, z=4)}')\n```\n\n### Example with sklearn\n\nThe problem being solved herein is the same problem, but in this case we also involve sklearn compatability - a core feature of EC-KitY.\nAdditional information for this example can be found in the [Sklearn Symbolic Regression Tutorial](https://github.com/EC-KitY/EC-KitY/wiki/Tutorial:-Sklearn-Compatible-Symbolic-Regression).\n\nA simple sklearn-compatible EA run:\n\n```python\nfrom sklearn.datasets import make_regression\nfrom sklearn.metrics import mean_absolute_error\nfrom sklearn.model_selection import train_test_split\n\nfrom eckity.algorithms.simple_evolution import SimpleEvolution\nfrom eckity.base.untyped_functions import f_add, f_div, f_mul, f_sub\nfrom eckity.creators.gp_creators.full import FullCreator\nfrom eckity.genetic_encodings.gp.tree.utils import create_terminal_set\nfrom eckity.genetic_operators import SubtreeCrossover, SubtreeMutation\nfrom eckity.sklearn_compatible.regression_evaluator import RegressionEvaluator\nfrom eckity.sklearn_compatible.sk_regressor import SKRegressor\nfrom eckity.subpopulation import Subpopulation\n\nX, y = make_regression(n_samples=100, n_features=3)\nterminal_set = create_terminal_set(X)\nfunction_set = [f_add, f_sub, f_mul, f_div]\n\nalgo = SimpleEvolution(\n    Subpopulation(\n        RegressionEvaluator(),\n        creators=FullCreator(\n            terminal_set=terminal_set,\n            function_set=function_set\n        ),\n        operators_sequence=[SubtreeCrossover(), SubtreeMutation()]\n    )\n)\nregressor = SKRegressor(algo)\n\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)\nregressor.fit(X_train, y_train)\nprint('MAE on test set:', mean_absolute_error(y_test, regressor.predict(X_test)))\n```\n\n### Feature comparison\nHere's a comparison table. The full paper is available [here](https://arxiv.org/abs/2207.10367).\n![image](https://github.com/EC-KitY/EC-KitY/blob/main/features.JPG?raw=true)\n\n### Authors\n[Moshe Sipper](http://www.moshesipper.com/ \"Moshe Sipper\"), \n[Achiya Elyasaf](https://achiya.elyasaf.net/ \"Achiya Elyasaf\"),\n[Itai Tzruia](https://www.linkedin.com/in/itai-tzruia-4a47a91b8/),\nTomer Halperin\n\n### Citation\n\nCitations are always appreciated 😊:\n```\n@article{eckity2023,\nauthor = {Moshe Sipper and Tomer Halperin and Itai Tzruia and Achiya Elyasaf},\ntitle = {{EC-KitY}: Evolutionary computation tool kit in {Python} with seamless machine learning integration},\njournal = {SoftwareX},\nvolume = {22},\npages = {101381},\nyear = {2023},\nurl = {https://www.sciencedirect.com/science/article/pii/S2352711023000778},\n}\n\n@misc{eckity2022git,\n    author = {Sipper, Moshe and Halperin, Tomer and Tzruia, Itai and  Elyasaf, Achiya},\n    title = {{EC-KitY}: Evolutionary Computation Tool Kit in {Python}},\n    year = {2022},\n    publisher = {GitHub},\n    journal = {GitHub repository},\n    howpublished = {\\url{https://www.eckity.org/} }\n}\n\n```\n\n### Sample repos using EC-KitY\n- [EC-KitY-Maze-Example](https://github.com/RonMichal/EC-KitY-Maze-Example/tree/maze_example/examples/vectorga/maze)\n- [EvolutionTSP](https://github.com/nogazax/EvolutionTSP)\n- [Solving The 'Nurse Scheduling Problem' With EC-KitY](https://github.com/harelaf/Nurse-Scheduling-Problem)\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fec-kity%2Fec-kity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fec-kity%2Fec-kity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fec-kity%2Fec-kity/lists"}