# like in create fobject
gmm <- calculate_group_fairness_metrics(group_matrices)
gmm_scaled <- abs(apply(gmm, 2 , function(x) x - gmm[,privileged]))
gmm_loss <- rowSums(gmm_scaled)
but the parity loss in fairness_check is computed this way:
# group metric matrix
gmm <- calculate_group_fairness_metrics(group_matrices)
# from every column in matrix subtract base column, then get abs value
# in other words we measure distance between base group
# metrics score and other groups metric scores
gmm_scaled <- apply(gmm, 2 , function(x) x / gmm[, privileged])
gmm_abs <- apply(gmm_scaled, 2 , function(x) sapply(x, function(y) abs(log(y))))
gmm_loss <- rowSums(gmm_abs)
Hi, thanks for the issue. You are right, in both all_cutoffs and ceteris_paribus_cutoff the so-called "parity_loss" should be computed like in fairness_check.
In the
all_cutoffs
function we can read:but the parity loss in
fairness_check
is computed this way:Why is the loss function not the same?