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.

Return type:

int

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.