{"id":13590178,"url":"https://github.com/aspuru-guzik-group/phoenics","last_synced_at":"2025-04-11T04:03:44.575Z","repository":{"id":91293194,"uuid":"117588573","full_name":"aspuru-guzik-group/phoenics","owner":"aspuru-guzik-group","description":"Phoenics: Bayesian optimization for efficient experiment planning","archived":false,"fork":false,"pushed_at":"2019-07-03T23:14:28.000Z","size":18274,"stargazers_count":91,"open_issues_count":6,"forks_count":20,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-11T04:03:37.259Z","etag":null,"topics":["bayesian-optimization","experiment-planning","phoenics","self-driving-laboratories"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aspuru-guzik-group.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,"governance":null}},"created_at":"2018-01-15T19:49:11.000Z","updated_at":"2025-02-18T21:42:38.000Z","dependencies_parsed_at":"2023-03-02T16:30:35.102Z","dependency_job_id":null,"html_url":"https://github.com/aspuru-guzik-group/phoenics","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspuru-guzik-group%2Fphoenics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspuru-guzik-group%2Fphoenics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspuru-guzik-group%2Fphoenics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspuru-guzik-group%2Fphoenics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aspuru-guzik-group","download_url":"https://codeload.github.com/aspuru-guzik-group/phoenics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248339285,"owners_count":21087215,"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":["bayesian-optimization","experiment-planning","phoenics","self-driving-laboratories"],"created_at":"2024-08-01T16:00:40.764Z","updated_at":"2025-04-11T04:03:44.553Z","avatar_url":"https://github.com/aspuru-guzik-group.png","language":"Python","funding_links":[],"categories":["Software"],"sub_categories":["Optimization"],"readme":"# Phoenics\n\n![](https://img.shields.io/github/release/aspuru-guzik-group/phoenics.svg?style=flat)\n![](https://img.shields.io/github/license/aspuru-guzik-group/phoenics.svg?style=flat)\n\n![](https://img.shields.io/github/issues-raw/aspuru-guzik-group/phoenics.svg?style=flat)\n\nPhoenics is an open source optimization algorithm combining ideas from Bayesian optimization with Bayesian Kernel Density estimation [1]. It performs global optimization on expensive to evaluate objectives, such as physical experiments or demanding computations. Phoenics supports sequential and batch optimizations and allows for the simultaneous optimization of multiple objectives via the Chimera scalarizing function [2].\n\nCheck out the `examples` folder for detailed descriptions and code examples for:\n\n| Example | Link | \n|:--------|:-----|\n| Sequential optimization           |  [examples/optimization_sequential](https://github.com/aspuru-guzik-group/phoenics/tree/master/examples/optimization_sequential)  |\n| Parallelizable batch optimization |  [examples/optimization_parallel](https://github.com/aspuru-guzik-group/phoenics/tree/master/examples/optimization_parallel)  |\n| Periodic parameter support        |  [examples/optimization_periodic_parameters](https://github.com/aspuru-guzik-group/phoenics/tree/master/examples/optimization_periodic_parameters)  | \n| Multi-objective optimization      |  [examples/optimization_multiple_objectives](https://github.com/aspuru-guzik-group/phoenics/tree/master/examples/optimization_multiple_objectives)  | \n\nMore elaborate applications of Phoenics and Chimera are listed below\n\n| Application \t\t\t\t\t\t  | Link                   | \n|:------------------------------------|:-----------------------|\n| Auto-calibration of a virtual robot | [examples/application_robot_calibration](https://github.com/aspuru-guzik-group/phoenics/tree/master/examples/application_robot_calibration) | \n\n\n\n# Chimera\n\nChimera is a general purpose achievement scalarizing function for multi-objective optimization. User preferences regarding the objectives are expected in terms of an importance hierarchy, as well as relative tolerances on each objective indicating what level of degradation is acceptable. Chimera is integrated into Phoenics, but also available for download as a wrapper for other optimization methods (see [chimera](https://github.com/aspuru-guzik-group/phoenics/tree/master/chimera)).\n\n\n# Installation\n\nYou can install Phoenics via pip\n\n```\napt-get install python-pip\npip install phoenics\n```\n\nor by creating a conda environment from the provided environment file\n\n```\nconda env create -f environment.yml\nsource activate phoenics\n```\n\nAlternatively, you can also choose to build Phoenics from source by cloning this repository\n\n```\ngit clone https://github.com/aspuru-guzik-group/phoenics.git\n```\n\n##### Requirements\n\nThis code has been tested with Python 3.6 and uses\n* cython 0.27.3\n* json 2.0.9\n* numpy 1.13.1\n* scipy 0.19.1\n\nPhoenics can construct its probabilistic model with two different probabilistic modeling libraries: PyMC3 and Edward. Depending on your preferences, you will either need \n* pymc3 3.2\n* theano 1.0.1\n\nor \n* edward 1.3.5\n* tensorflow 1.4.1\n\nCheck out the `environment.yml` file for more details. \n\n\n\n\n# Using Phoenics\n\nPhoenics is designed to suggest new parameter points based on prior observations. The suggested parameters can then be passed on to objective evaluations (experiments or involved computation). As soon as the objective values have been determined for a set of parameters, these new observations can again be passed on to Phoenics to request new, more informative parameters.\n\n```python\nfrom phoenics import Phoenics\n    \n# create an instance from a configuration file\nconfig_file = 'config.json'\nphoenics    = Phoenics(config_file)\n    \n# request new parameters from a set of observations\nparams      = phoenics.choose(observations = observations)\n```\nDetailed examples for specific applications are presented in the `examples` folder. \n\n\n# Using Chimera\n\nChimera is integrated into Phoenics, but also available as a stand-alone wrapper for other single-objective optimization algorithms. The Chimera wrapper allows to cast a set of objectives for a number of observations into a single objective value for each observation, enabling single-objective optimization algorithms to solve the multi-objective optimization problem. The usage of Chimera is outlined below on an example with four objective functions\n\n```python\nfrom chimera import Chimera\n\n# define tolerances in descending order of importance\ntolerances = [0.25, 0.1, 0.25, 0.05]\n\n# create Chimera instance\nchimera = Chimera(tolerances)\n\n# cast objectives of shape      [num_observations, num_objectives]\n# into single objective vector  [num_observations, 1]\nsingle_objectives = chimera.scalarize_objectives(objectives)\n\n```\n\n**Note**: Phoenics automatically employs Chimera when the configuration contains more than one objective.\n\n### Disclaimer\n\nNote: This repository is under construction! We hope to add further details on the method, instructions and more examples in the near future. \n\n### Experiencing problems? \n\nPlease create a [new issue](https://github.com/aspuru-guzik-group/phoenics/issues/new/choose) and describe your problem in detail so we can fix it.\n\n### References\n\n[1] Häse, F., Roch, L. M., Kreisbeck, C., \u0026 Aspuru-Guzik, A. [Phoenics: A Bayesian Optimizer for Chemistry.](https://pubs.acs.org/doi/abs/10.1021/acscentsci.8b00307) ACS central science 4.6 (2018): 1134-1145.\n\n[2] Häse, F., Roch, L. M., \u0026 Aspuru-Guzik, A. [Chimera: enabling hierarchy based multi-objective optimization for self-driving laboratories.](https://pubs.rsc.org/en/content/articlehtml/2018/sc/c8sc02239a) Chemical Science (2018).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faspuru-guzik-group%2Fphoenics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faspuru-guzik-group%2Fphoenics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faspuru-guzik-group%2Fphoenics/lists"}