optuna.terminator.BestValueStagnationEvaluator

class optuna.terminator.BestValueStagnationEvaluator(max_stagnation_trials=30)[源代码]

评估优化过程中最佳值的停滞期。

此类使用最大停滞期(`max_stagnation_trials`)进行初始化,旨在评估在达到允许的最大停滞期之前的剩余试验次数。如果剩余试验次数达到零,则试验终止。因此,默认的误差评估器通过 `StaticErrorEvaluator(const=0)` 实例化。

参数:

max_stagnation_trialsint)– 允许的最大停滞试验次数。

注意

作为实验性功能添加于 v3.4.0。接口可能在未来版本中更改,恕不另行通知。请参阅 https://github.com/optuna/optuna/releases/tag/v3.4.0

方法

evaluate(trials, study_direction)