seldonian.models.objectives.gradient_binary_logistic_loss

gradient_binary_logistic_loss(model, theta, X, Y, **kwargs)

Gradient of binary logistic loss w.r.t. theta. WARNING: This is only valid for binary logistic regression models! DO NOT USE FOR NEURAL NETWORKS. Also, the number of parameters must be the same as the number of model weights.

Parameters:
  • model – SeldonianModel instance

  • theta (numpy ndarray) – The parameter weights

  • X (numpy ndarray) – The features

  • Y (numpy ndarray) – The labels

Returns:

d(log loss)/dtheta

Return type:

float