seldonian.models.objectives.True_Positive_Rate

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

Calculate mean true positive rate for the whole sample. This has slightly different meanings depending on binary vs. multi-class setting.

Parameters:
  • model – SeldonianModel instance

  • theta (numpy ndarray) – The parameter weights

  • X (numpy ndarray) – The features

  • Y (numpy ndarray) – The labels

Returns:

Mean true positive rate

Return type:

float between 0 and 1