« Back to top page

TPE Sampler

Sampler using TPE (Tree-structured Parzen Estimator) algorithm.

Class or Function Names

  • TPESampler

Example

import optuna
from optuna.samplers import TPESampler


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


sampler = TPESampler()
study = optuna.create_study(sampler=sampler)
study.optimize(objective, n_trials=10)

Others

See the documentation for more details.

Package
samplers/tpe
Author
Optuna team
License
MIT License
Verified Optuna version
  • 3.6.1
Last update
2024-07-05