MCPcopy
hub / github.com/hyperopt/hyperopt / true_loss

Method true_loss

hyperopt/base.py:981–987  ·  view source on GitHub ↗

Return a true loss, in the case that the `loss` is a surrogate

(self, result, config=None)

Source from the content-addressed store, hash-verified

979 return result.get("loss_variance", 0.0)
980
981 def true_loss(self, result, config=None):
982 """Return a true loss, in the case that the `loss` is a surrogate"""
983 # N.B. don't use get() here, it evaluates self.loss un-necessarily
984 try:
985 return result["true_loss"]
986 except KeyError:
987 return self.loss(result, config=config)
988
989 def true_loss_variance(self, config=None):
990 """Return the variance in true loss,

Callers

nothing calls this directly

Calls 1

lossMethod · 0.95

Tested by

no test coverage detected