{"id":13806946,"url":"https://github.com/alonfnt/bayex","last_synced_at":"2025-04-05T07:02:25.550Z","repository":{"id":41563960,"uuid":"391573186","full_name":"alonfnt/bayex","owner":"alonfnt","description":"Minimal Implementation of Bayesian Optimization in JAX","archived":false,"fork":false,"pushed_at":"2025-01-09T19:18:39.000Z","size":232,"stargazers_count":90,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-29T06:05:11.413Z","etag":null,"topics":["automatic-differentiation","bayesian-optimization","gaussian-process-regression","jax","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/alonfnt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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-08-01T08:41:02.000Z","updated_at":"2025-03-25T23:45:54.000Z","dependencies_parsed_at":"2024-01-07T10:51:05.126Z","dependency_job_id":"2aed84a9-4cc1-4a17-894b-e2159d60365a","html_url":"https://github.com/alonfnt/bayex","commit_stats":{"total_commits":52,"total_committers":2,"mean_commits":26.0,"dds":0.3846153846153846,"last_synced_commit":"12e2c0923bd6fbbbad85f379feac0c06d951dd6b"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alonfnt%2Fbayex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alonfnt%2Fbayex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alonfnt%2Fbayex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alonfnt%2Fbayex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alonfnt","download_url":"https://codeload.github.com/alonfnt/bayex/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299829,"owners_count":20916190,"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":["automatic-differentiation","bayesian-optimization","gaussian-process-regression","jax","python"],"created_at":"2024-08-04T01:01:18.365Z","updated_at":"2025-04-05T07:02:25.522Z","avatar_url":"https://github.com/alonfnt.png","language":"Python","funding_links":[],"categories":["Libraries"],"sub_categories":["New Libraries"],"readme":"# Bayex: Minimal Bayesian Optimization in JAX\n[![tests](https://github.com/alonfnt/bayex/actions/workflows/tests.yml/badge.svg)](https://github.com/alonfnt/bayex/actions/workflows/tests.yml)\n\u003e[!NOTE]\n\u003eBayex is currently a minimal, personally developed implementation that requires further development for broader application. If you're interested in engaging with Jax and enhancing Bayex, your contributions would be highly welcomed and appreciated.\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/alonfnt/bayex/assets/38870744/ffb920ed-f347-4185-9abe-24ec2d0a22f1\" height=\"300\"\u003e\n    \u003cimg src=\"https://github.com/alonfnt/bayex/assets/38870744/882fecc7-bc30-4267-ad1d-687fdbbe2cdc\" height=\"300\"\u003e\n\u003c/p\u003e\n\nBayex is a lightweight Bayesian optimization library designed for efficiency and flexibility, leveraging the power of JAX for high-performance numerical computations.\nThis library aims to provide an easy-to-use interface for optimizing expensive-to-evaluate functions through Gaussian Process (GP) models and various acquisition functions. Whether you're maximizing or minimizing your objective function, Bayex offers a simple yet powerful set of tools to guide your search for optimal parameters.\n\n## Installation\u003ca id=\"installation\"\u003e\u003c/a\u003e\nBayex can be installed using [PyPI](https://pypi.org/project/bayex/) via `pip`:\n```\npip install bayex\n```\n\n## Usage\u003ca id=\"usage\"\u003e\u003c/a\u003e\nUsing Bayex is quite simple despite its low level approach:\n```python\nimport jax\nimport numpy as np\nimport bayex\n\ndef f(x):\n    return -(1.4 - 3 * x) * np.sin(18 * x)\n\ndomain = {'x': bayex.domain.Real(0.0, 2.0)}\noptimizer = bayex.Optimizer(domain=domain, maximize=True, acq='PI')\n\n# Define some prior evaluations to initialise the GP.\nparams = {'x': [0.0, 0.5, 1.0]}\nys = [f(x) for x in params['x']]\nopt_state = optimizer.init(ys, params)\n\n# Sample new points using Jax PRNG approach.\nori_key = jax.random.key(42)\nfor step in range(20):\n    key = jax.random.fold_in(ori_key, step)\n    new_params = optimizer.sample(key, opt_state)\n    y_new = f(**new_params)\n    opt_state = optimizer.fit(opt_state, y_new, new_params)\n```\n\nwith the results being saved at `opt_state`.\n\n## Contributing\u003ca id=\"contributing\"\u003e\u003c/a\u003e\nWe welcome contributions to Bayex! Whether it's adding new features, improving documentation, or reporting issues, please feel free to make a pull request or open an issue.\n\n## License\u003ca id=\"license\"\u003e\u003c/a\u003e\nBayex is licensed under the MIT License. See the ![LICENSE](LICENSE) file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falonfnt%2Fbayex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falonfnt%2Fbayex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falonfnt%2Fbayex/lists"}