Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LFR bias mitigation method always returns a dataset with single class when passing multiclass dataset #440

Open
pradeepdev-1995 opened this issue Jan 28, 2023 · 1 comment

Comments

@pradeepdev-1995
Copy link

I am trying to implement the LFR pre-processing bias mitigation in a multi-class classification dataset. The original dataset has 4 distinct classes as the target variable. Used the below code for LFR.

TR = LFR(unprivileged_groups=unprivileged_groups,
         privileged_groups=privileged_groups,
         k=10, Ax=0.1, Ay=1.0, Az=2.0,
         verbose=1
        )
TR = TR.fit(original_dataset, maxiter=5000, maxfun=5000)
dataset_transf_train = TR.transform(original_dataset)

print("dataset_transf_train")
print(dataset_transf_train.labels)

This code shows that the transformed dataset has always a single target column. Where have the other classes gone? Should I apply any tuning method for this?

@Rajesh-Nair
Copy link

Faced similar issue but when the threshold value is tuned, for a certain range LFR did work and brought the bias down.

Learning Fair Representations
LFR_model = LFR(seed=1,unprivileged_groups=unprivileged_groups, privileged_groups=privileged_groups, k=3, verbose=0)
dataset_transformed = LFR_model.fit_transform(dataset_original, maxiter=5000, maxfun=5000, threshold=0.25)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants