Skip to content

all_cutoffs parity loss #24

@Locust2520

Description

@Locust2520

In the all_cutoffs function we can read:

      # 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)

Why is the loss function not the same?

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomersminor bug 😞Something should be fixed but it's not critical.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions