Python, Programming, Data Science, Artificial Intelligence, Machine Learning.
# Model predictions # Create a group object group = Group() group.fit(data, sensitive_attributes=['race', 'gender']) # Create a bias object bias = Bias() bias.fit(group, predictions) # Calculate fairness metrics fairness_metrics = bias.get_disparity_major_group(group_metrics=['tpr', 'fpr',