我使用“ hyperopt” Python软件包调整算法,
我找不到如何打印丢失的最佳配置的信息:

from hyperopt import fmin, tpe, rand, space_eval, Trials
trials = Trials()
best = fmin(ils, space, rand.suggest, 100, trials=trials)
print ...


我已经知道如何打印最佳配置!

最佳答案

我设法做到这一点,如下所示:

fnvals = [t['result']['loss'] for t in trials.trials]
print max(fnvals)


也许有简单的方法?

10-07 18:13