fairlearn.metrics.count#

fairlearn.metrics.count(y_true, y_pred)[source]#

Calculate the number of data points in each group when working with MetricFrame.

The y_true argument is used to make this calculation. For consistency with other metric functions, the y_pred argument is required, but ignored.

Read more in the User Guide.

Parameters
  • y_true (array_like) – The list of true labels

  • y_pred (array_like) – The predicted labels (ignored)

Returns

The number of data points in each group.

Return type

int