{"id":38659035,"url":"https://github.com/eliottkalfon/evolution_opt","last_synced_at":"2026-01-17T09:33:48.588Z","repository":{"id":48215806,"uuid":"256952020","full_name":"eliottkalfon/evolution_opt","owner":"eliottkalfon","description":"Evolution-inspired optimisation algorithms","archived":false,"fork":false,"pushed_at":"2021-02-19T11:08:10.000Z","size":555,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-08T03:56:20.434Z","etag":null,"topics":["automl","evolutionary-algorithms","genetic-algorithm","hyperparameter-optimization","machine-learning"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eliottkalfon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-19T08:39:03.000Z","updated_at":"2022-07-22T14:48:54.000Z","dependencies_parsed_at":"2022-09-19T07:40:57.897Z","dependency_job_id":null,"html_url":"https://github.com/eliottkalfon/evolution_opt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eliottkalfon/evolution_opt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliottkalfon%2Fevolution_opt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliottkalfon%2Fevolution_opt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliottkalfon%2Fevolution_opt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliottkalfon%2Fevolution_opt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eliottkalfon","download_url":"https://codeload.github.com/eliottkalfon/evolution_opt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliottkalfon%2Fevolution_opt/sbom","scorecard":{"id":372940,"data":{"date":"2025-08-11","repo":{"name":"github.com/eliottkalfon/evolution_opt","commit":"f0e019e95fb87c82853c3c55f2006d94061fae5e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: evolution_opt/__pycache__/genetic.cpython-37.pyc:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-18T13:25:22.543Z","repository_id":48215806,"created_at":"2025-08-18T13:25:22.543Z","updated_at":"2025-08-18T13:25:22.543Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28505564,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["automl","evolutionary-algorithms","genetic-algorithm","hyperparameter-optimization","machine-learning"],"created_at":"2026-01-17T09:33:47.905Z","updated_at":"2026-01-17T09:33:48.556Z","avatar_url":"https://github.com/eliottkalfon.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](https://github.com/eliottkalfon/evolution_opt/blob/master/resources/eo_logo.png)\n\n# Description\n\nThis package aims at providing a range of nature-inspired optimisation algorithms. \nThe purpose of an optimisation algorithm is to find the maximum or minimum of a function. \u003cbr\u003e\nGenetic algorithms are particularly useful when it comes to **high-dimensional, non-linear and non-convex problems** (e.g. finding a needle in the 10-dimensional hay). \nThey have a wide range of application from supply chain optimisation to hyperparameter tuning.\nThis first version includes an implementation of genetic algorithm with \"regularized evolution\".\n\nGenetic algorithms are very useful in machine learning, especially in **hyperparameter tuning**.\nThe example folder contains two examples of genetic algorithms used to:\u003cbr\u003e\n1) Optimise the architecture and hyperparameters of a Neural Network ([link](https://github.com/eliottkalfon/evolution_opt/blob/master/example/Neural%20Network%20Optimisation.ipynb))\u003cbr\u003e\n2) Tune the hyperparameters of a Support Vector Machine and a XGBoost model ([link](https://github.com/eliottkalfon/evolution_opt/blob/master/example/SVM%20and%20XGBoost%20Optimisation.ipynb))\n\nThe full documentation can be found [here](https://eliottkalfon.github.io/evolution_opt/).\n\n# Installation\n\nThis package can be installed with \"pip\" or by cloning this repository\n\n    $ pip install evolution_opt\n\t\n# Dependencies\n\nTo install and run evolution_opt make sure that you have installed the following packages\n\n    $ pip install numpy pandas scipy matplotlib\n\t\n# Importing evolution_opt\n\n```python\nimport numpy as np\nimport pandas as pd\nfrom evolution_opt.genetic import *\n```\n\n# Example Usage\n\n## 1) Define a function to be optimised\n    \nThis function has to take a dictionary of parameter as argument:\n```python\ndef difficult_problem(param_dict):\n    result = param_dict['x']**2 + (param_dict['y']+1)**2\n    if param_dict['luck'] == 'lucky':\n        pass\n    else:\n        result += 10\n    return result\n```\n  This function could be **any process** that takes parameters as input and outputs a scalar value.\n    \n  It could evaluate a model's cross-validation score based on given hyperparameter values,\n  a profit/cost function, the efficiency of a resourcing plan... The possibilities are limitless.\n    \n ## 2) Define a search space\n```python\nsearch_space = [\n    Integer(-100,100, 'x'),\n    Real(-100,100, 'y'),\n    Categorical(['lucky', 'unlucky'], 'luck')\n]\n```   \n  The search space can be composed of Integer, Real and Categorical variables.\n  Numeric parameters are initialised with a lower bound, upper bound and a parameter name.\n  Categorical parameters require a list of possible values and a parameter name.\n    \n  ## 3) Run the evolutionary algorithm\n```python\nbest_params = optimise(difficult_problem,search_space,minimize=True, \n                           population_size=20,n_rounds=500)   \n\n# Prints:\n# Number of Iterations: 500\n# Best score: 0.00410559779230605\n# Best parameters: {'x': -0.0, 'y': -1.0640749388786759, 'luck': 'lucky'}\n```\n\n# Credits\n\n- Icon featured in the logo: Icon made by \u003ca href=\"https://www.flaticon.com/authors/freepik\" title=\"Freepik\"\u003eFreepik\u003c/a\u003e from \u003ca href=\"https://www.flaticon.com/\" title=\"Flaticon\"\u003e www.flaticon.com\u003c/a\u003e\n- Regularized Evolution Algorithm inspiration: Saltori, Cristiano, et al. [\"Regularized Evolutionary Algorithm for Dynamic Neural Topology Search.\"](https://arxiv.org/abs/1905.06252) *International Conference on Image Analysis and Processing*. Springer, Cham, 2019.\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feliottkalfon%2Fevolution_opt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feliottkalfon%2Fevolution_opt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feliottkalfon%2Fevolution_opt/lists"}