Open akuzni2 opened 3 years ago
Was a solution found for this? I am seeing the same thing now
I think that is actually the intended result. You may compare the dataset before and after, and the disparate_impact_remover has adjusted the feature values.
@OnTheThirdDay How can I compare the datasets( original dataset and the disparate impact removed dataset) through code?
@OnTheThirdDay How can I compare the datasets( original dataset and the disparate impact removed dataset) through code?
Hi @pradeepdev-1995 , I haven't followed this thread for long, so a bit forgot the context. To compare, you can export the dataset (e.g. into csv) and you can see the feature values are actually different, though the DI score is not changed.
di_remover = DisparateImpactRemover(repair_level=1.0)
train_repd = di_remover.fit_transform(dataset_train)
How can I export the train_repd
to csv?
kindly share the code snippet for this.
di_remover = DisparateImpactRemover(repair_level=1.0) train_repd = di_remover.fit_transform(dataset_train)
How can I export the
train_repd
to csv? kindly share the code snippet for this.
Use some api like .convert_to_dataframe() and to_csv()
@OnTheThirdDay
Checked with convert_to_dataframe
function of AIF360 like this
di = DisparateImpactRemover(repair_level=1.0)
dir_dataset = di.fit_transform(dataset)
dir_dataset_df= dir_dataset.convert_to_dataframe(sep=",")
print(originalDataset.equals(dir_dataset_df[0]))
But it shows that original and transformed datasets are the same. Which means DisparateImpactRemover nothing changed in the dataset even the repair_level=1.0
I'm trying to run the disparate impact remover on a dataset - however after varying the repair value between 0 -> 1.0 I see no change in disparate impact metric.
Example: My dataset (df_encoded) looks like the below with around 600 samples.
In my dataset i get a disparate impact of 0.71. When I change "repair_level" to 0 or 1.0 I see no change in disparate impact.