OptunaHub / Gaussian Process-Based Sampler

Sampler using Gaussian process-based Bayesian optimization.

Package: samplers/gp
Author: Optuna team
License: MIT License
Verified Optuna version: 3.6.1

Class or Function Names

Installation

pip install scipy pytorch

Example

import optuna
from optuna.samplers import GPSampler


def objective(trial):
  x = trial.suggest_float("x", -5, 5)
  return x**2


sampler = GPSampler()
study = optuna.create_study(sampler=sampler)
study.optimize(objective, n_trials=100)

Others

See the documentation for more details.