예제 #1
0
 def map(self, pred, act, w, o, model):
     import water.util.MathUtils as math
     idx = int(act[0])
     err = 1 - pred[idx + 1] if idx + 1 < len(pred) else 1
     return [w * math.logloss(err), w]