« Back to top page

Warmstart

Warmstart

NSGAII sampler with Initial Trials

Abstract If Optuna’s built-in NSGAII has a study obtained from another sampler, but continues with that study, it cannot be used as the first generation, and optimization starts from zero. This means that even if you already know good individuals, you cannot use it in the GA. In this implementation, the already sampled results are included in the initial individuals of the GA to perform the optimization. Note, however, that this has the effect that the implementation does not necessarily support multi-threading in the generation of the initial generation.

NSGAIISampler Using TPESampler for the Initialization

Abstract This sampler uses TPESampler instead of RandomSampler for the initialization of NSGAIISampler. APIs NSGAIIWithTPEWarmupSampler This class takes the identical interface as the Optuna NSGAIISampler. Example from __future__ import annotations import optuna import optunahub def objective(trial: optuna.Trial) -> tuple[float, float]: x = trial.suggest_float("x", -5, 5) y = trial.suggest_float("y", -5, 5) return x**2 + y**2, (x - 2) ** 2 + (y - 2) ** 2 package_name = "samplers/nsgaii_with_tpe_warmup" sampler = optunahub.