Exemplo n.º 1
0
 def loss(X, y, params):
     y_pred = predict(params, X, regression=regression)
     if regression:
         l = square_error(y, y_pred).mean()
     else:
         l = log_loss(y, y_pred).mean()
     return l
Exemplo n.º 2
0
 def loss(X, y, params):
     y_pred = predict(params, X)
     l = log_loss(y, y_pred).mean()
     return l
Exemplo n.º 3
0
 def loss(X, y, params):
     y_pred = predict(params, X,
                      n_jets_per_event=n_jets_per_event)
     l = log_loss(y, y_pred).mean()
     return l