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. :rtype: int

Added in version 0.7.0.

Parameters:
y_truearray_like

The list of true labels

y_predarray_like

The predicted labels (ignored)

Returns:
int

The number of data points in each group.