diff --git a/docs/api.rst b/docs/api.rst index 18f8bc72..e26dcfd6 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -44,6 +44,7 @@ Preferential Optimization optuna_dashboard.preferential.create_study optuna_dashboard.preferential.load_study optuna_dashboard.preferential.PreferentialStudy + optuna_dashboard.preferential.samplers.gp.PreferentialGPSampler optuna_dashboard.register_preference_feedback_component Streamlit diff --git a/optuna_dashboard/preferential/samplers/gp.py b/optuna_dashboard/preferential/samplers/gp.py index 2e782b68..beb5b7c2 100644 --- a/optuna_dashboard/preferential/samplers/gp.py +++ b/optuna_dashboard/preferential/samplers/gp.py @@ -284,6 +284,26 @@ class _PreferentialGP: class PreferentialGPSampler(optuna.samplers.BaseSampler): + """Sampler for preferential optimization using Gaussian process. + + The sampling algorithm is based on `Takeno et al., 2023 `_. + This sampler uses BoTorch to optimize acquisition function. + + Args: + kernel: + Kernel that computes the covariance on the Gaussian process. Defaults to + Matern 3/2 Kernel + ARD. + noise_prior: + Prior of the observation noise. Defaults to gamma prior. + independent_sampler: + A :class:`~optuna.samplers.BaseSampler` instance that is used for independent + sampling. The parameters not contained in the relative search space are sampled + by this sampler. If :obj:`None` is specified, + :class:`~optuna.samplers.RandomSampler` is used as the default. + seed: + Seed for random number generator. + """ + def __init__( self, *, diff --git a/pyproject.toml b/pyproject.toml index 4eff6f1f..9d8500dc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,6 +36,7 @@ dynamic = ["version"] [project.optional-dependencies] docs = [ "boto3", + "botorch", "streamlit", "sphinx", "sphinx_rtd_theme",