seldonian.parse_tree.zhat_funcs.vector_Positive_Rate

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

Calculate positive rate for each observation. Meaning depends on whether binary or multi-class classification.

Parameters:
  • model – SeldonianModel instance

  • theta (numpy ndarray) – The model weights

  • X (numpy ndarray) – The features

  • Y (numpy ndarray) – The labels

Returns:

Positive rate for each observation

Return type:

numpy ndarray(float between 0 and 1)