bayesian-optimization
An introduction to Bayesian optimization with an example of accelerator tuning task.
https://github.com/machine-learning-tutorial/bayesian-optimization
Science Score: 67.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
Found 6 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.5%) to scientific vocabulary
Keywords
Repository
An introduction to Bayesian optimization with an example of accelerator tuning task.
Basic Info
- Host: GitHub
- Owner: machine-learning-tutorial
- License: gpl-3.0
- Language: Jupyter Notebook
- Default Branch: main
- Homepage: https://machine-learning-tutorial.github.io/bayesian-optimization/
- Size: 4.45 MB
Statistics
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 2
Topics
Metadata Files
README.md
Tutorial on introduction to Bayesian optimization
Material for this tutorial
- The tutorial in slide form can be found here
Download the repository
Get the repository with Git
You will need to have Git previously installed in your computer. To check if you have it installed, open your terminal and type:
bash
git --version
Git installation in macOS
bash
brew update
brew install git
Git installation in Linux
In Ubuntu/Debian
bash
sudo apt install git
In CentOS
bash
sudo yum install git
Once you have Git installed open your terminal, go to your desired directory, and type:
bash
git clone https://github.com/machine-learning-tutorial/bayesian-optimization
cd bayesian-optimization
Get the repository with direct download
Open your terminal, go to your desired directory, and type:
bash
wget https://github.com/machine-learning-tutorial/bayesian-optimization/archive/refs/heads/main.zip
unzip main.zip
cd bayesian-optimization
Getting started
You need to install the dependencies before running the notebooks.
Using conda
If you don't have conda installed already and want to use conda for environment management, you can install the miniconda as described here.
- Create a conda env with
conda create -n bo-tutorial python=3.10 - Activate the environment with
conda activate bo-tutorial - Install the required packages via
pip install -r requirements.txt. - Run the following commands:
bash
python -m jupyter contrib nbextension install --user
python -m jupyter nbextension enable varInspector/main
- After the tutorial you can remove your environment with
conda remove -n bo-tutorial --all
Using venv only
If you do not have conda installed:
Alternatively, you can create the virtual env with venv in the standard library
bash
python -m venv bo-tutorial
and activate the env with $ source
Then, install the packages with pip within the activated environment
bash
python -m pip install -r requirements.txt
python -m jupyter contrib nbextension install --user
python -m jupyter nbextension enable varInspector/main
Afterwards, you should be able to run the provided notebooks.
Running the tutorial
After installing the package
You can start the jupyter notebook in the terminal, and it will start a browser automatically
bash
python -m jupyter notebook
Alternatively, you can use supported Editor to run the jupyter notebooks, e.g. with VS Code.
Jupyter Notebooks
Use cmd+Enter to execute one cell block
BO with scikit-learn
In the sklearn-gp folder, there's an additional notebook explaining the BO concepts using only the scikit-learn package.
Citing the tutorial
This tutorial is registered Zenodo. Please use this DOI when citing this code:
bibtex
@software{andrea_santamaria_garcia_2024_10723703,
author = {Santamaria Garcia, Andrea and
Xu, Chenran},
title = {{Tutorial on introduction to Bayesian optimization}},
month = {02},
year = {2024},
publisher = {Zenodo},
version = {v1.0},
doi = {10.5281/zenodo.10723703},
url = {https://doi.org/10.5281/zenodo.10723703}
}
Disclaimer
The content of this repository was developed by the AI4Accelerators team at the Institute of Beam Physics and Technology (IBPT), Karlsruhe Institute of Technology.
Owner
- Name: machine learning tutorial
- Login: machine-learning-tutorial
- Kind: organization
- Repositories: 1
- Profile: https://github.com/machine-learning-tutorial
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: Santamaria Garcia
given-names: Andrea
affiliation: Karlsruhe Institute of Technology
orcid: "https://orcid.org/0000-0002-7498-7640"
- family-names: Xu
given-names: Chenran
affiliation: Karlsruhe Institute of Technology
orcid: "https://orcid.org/0000-0002-5034-2207"
title: "Tutorial on introduction to Bayesian optimization"
type: software
version: 1.0.1
doi: 10.5281/zenodo.10723703
date-released: 2024-03-25
url: "https://github.com/machine-learning-tutorial/bayesian-optimization"
GitHub Events
Total
- Watch event: 2
Last Year
- Watch event: 2
Dependencies
- actions/checkout v2 composite
- actions/setup-python v2 composite
- s0/git-publish-subdir-action develop composite
- RISE *
- botorch *
- cheetah-accelerator ==0.5.18
- gym ==0.26.2
- ipython *
- ipywidgets *
- jupyter_contrib_nbextensions *
- matplotlib *
- notebook ==6.4.12
- numpy *
- scipy *
- torch *
- tqdm *
- traitlets ==5.9.0
- h5py *
- jupyterlab *
- matplotlib *
- numpy *
- scikit-learn *
- scikit-optimize *
- torch *