This is the repo for GraphComBO, a Bayesian optimization tool for black-box and expensive functions defined over node subsets in graphs, where the goal is to find the optimal subset within a limited number of queries (evaluations of the underlying function).
conda create -n GraphComBO
conda activate GraphComBO
The following common packages are assumed to be installed beforehand:
numpy pandas matplotlib scipy networkx math functools itertools future multiprocessing
Note that scikit-learn and PyTorch are also required, which can be installed in the links.
We use BoTorch and GPyTorch to implement our BO algorithm.
To install BoTorch with conda:
conda install botorch -c pytorch -c gpytorch -c conda-forge
or alternatively install with pip
pip install botorch
Lastly, the following packages are used for different experiment setups.
pip install torch_geometric
pip install ndlib
pip install osmnx
pip install ogb
Use the following line in a bash shell to test the algorithm with the default config from configurations/testing.yaml,
and enable --plot_result True to visualize the result.
python main.py --plot_result TrueTo reproduce the experiment results, use the following code with pre-specified configurations:
python main.py --problem BA
python main.py --problem WS
python main.py --problem GRID
python main.py --problem SBM
python main.py --problem Transitivity
python main.py --problem GNN_attack
python main.py --problem Coauthor_IC
python main.py --problem SIR
python main.py --problem Patient_Zero
