optuna.prunersΒΆ

The pruners module defines a BasePruner class characterized by an abstract prune() method, which, for a given trial and its associated study, returns a boolean value representing whether the trial should be pruned. This determination is made based on stored intermediate values of the objective function, as previously reported for the trial using optuna.trial.Trial.report(). The remaining classes in this module represent child classes, inheriting from BasePruner, which implement different pruning strategies.

See also

3. Efficient Optimization Algorithms tutorial explains the concept of the pruner classes and a minimal example.

optuna.pruners.BasePruner

Base class for pruners.

optuna.pruners.MedianPruner

Pruner using the median stopping rule.

optuna.pruners.NopPruner

Pruner which never prunes trials.

optuna.pruners.PatientPruner

Pruner which wraps another pruner with tolerance.

optuna.pruners.PercentilePruner

Pruner to keep the specified percentile of the trials.

optuna.pruners.SuccessiveHalvingPruner

Pruner using Asynchronous Successive Halving Algorithm.

optuna.pruners.HyperbandPruner

Pruner using Hyperband.

optuna.pruners.ThresholdPruner

Pruner to detect outlying metrics of the trials.