文章目录
对于单目标优化,默认用
TPESampler
(默认参)
optuna.samplers._tpe.sampler.TPESampler
class TPESampler(BaseSampler):
def __init__(
self,
consider_prior: bool = True,
prior_weight: float = 1.0,
consider_magic_clip: bool = True,
consider_endpoints: bool = False,
n_startup_trials: int = 10,
n_ei_candidates: int = 24,
gamma: Callable[[int], int] = default_gamma,
weights: Callable[[int], np.ndarray] = default_weights,
seed: Optional[int] = None,
*,
multivariate: bool = False,
warn_independent_sampling: bool = True,
) -> None:
- default_gamma
def default_gamma(x: int) -> int:
return