fairlearn.reductions.BoundedGroupLoss#

class fairlearn.reductions.BoundedGroupLoss(loss, *, upper_bound=None)[source]#

Moment for constraining the worst-case loss by a group.

For more information refer to the user guide.

bound()[source]#

Return the vector of bounds.

Return type:

Series

Returns:
pandas.Series

A vector of bounds on group-level losses

default_objective()[source]#

Return a default objective.

Return type:

MeanLoss

gamma(predictor)[source]#

Calculate the degree to which constraints are currently violated by the predictor.

Return type:

Series

load_data(X, y, *, sensitive_features)[source]#

Load data into the moment object.

Return type:

None

project_lambda(lambda_vec)[source]#

Return the lambda values.

Return type:

Series

signed_weights(lambda_vec=None)[source]#

Return the signed weights.

Return type:

Series

property index: Index#

Return the index listing the constraints.

property total_samples: int#

Return the number of samples in the data.