fairlearn.metrics.mean_prediction#

fairlearn.metrics.mean_prediction(y_true, y_pred, sample_weight=None)[source]#

Calculate the (weighted) mean prediction.

The true values are ignored, but required as an argument in order to maintain a consistent interface

Parameters:
  • y_true (array_like) – The true labels (ignored)

  • y_pred (array_like) – The predicted labels

  • sample_weight (array_like) – Optional array of sample weights

Return type:

float