optuna.pruners.BasePruner
- class optuna.pruners.BasePruner[源代码]
Base class for pruners.
Methods
prune
(study, trial)Judge whether the trial should be pruned based on the reported values.
- abstract prune(study, trial)[源代码]
Judge whether the trial should be pruned based on the reported values.
Note that this method is not supposed to be called by library users. Instead,
optuna.trial.Trial.report()
andoptuna.trial.Trial.should_prune()
provide user interfaces to implement pruning mechanism in an objective function.- 参数
study (optuna.study.Study) – Study object of the target study.
trial (optuna.trial._frozen.FrozenTrial) – FrozenTrial object of the target trial. Take a copy before modifying this object.
- 返回
A boolean value representing whether the trial should be pruned.
- 返回类型