Questions tagged [aif360]

AI Fairness 360 is an open source toolkit for examining, reporting, and mitigating discrimination and bias in machine learning models.

13 questions
1
vote
0 answers

What should be the right way to pass the protected attribute in aif360.sklearn.metrics import disparate_impact_ratio?

I am trying to compute the disparate_impact_ratio in the Adult Dataset. Currently I wrote this : disparate_impact_ratio(uci_adult_df['income'],prot_attr='sex',priv_group=1, pos_label=1,sample_weight=None) It is giving me the error ValueError: Some…
uditi
  • 11
  • 2
1
vote
3 answers

Calculate group fairness metrics with AIF360

I want to calculate group fairness metrics using AIF360. This is a sample dataset and model, in which gender is the protected attribute and income is the target. import pandas as pd from sklearn.svm import SVC from aif360.sklearn import metrics df…
Reveille
  • 4,359
  • 3
  • 23
  • 46
1
vote
2 answers

TypeError: ratio() missing 1 required positional argument: 'metric_fun'

I'm trying to use the aif360 library of ibm for debiasing. I'm working on a linear regression model and want to try out a metric to calculate the difference between the priviliged and unpriviliged groups. However when this code is run I get the…
Sef
  • 85
  • 7
0
votes
0 answers

AIF360 AI Fairness Library - Converting Pandas DataFrame with StandardDataset()

In the code below, I have included 5 records for reproducibility. Most of the parameters that I am using are directly from the source code example of instantiated the COMPAS dataset, but I cannot convert the DataFrame into a StandardDataset as it…
0
votes
0 answers

Error when installing AIF360 Package (installing package in isolated python environment in R using reticulate)

I have been trying to install the IBM AIF360 package in R. It is distributed as a Python package and so needs to be installed within a Python environment. A function from the package, install_aif360(), attempted to install AIF360 within an isolated…
0
votes
0 answers

AIF360 PYTHON - OPTIMIZED PRE-PROCESSING

I have been busy with the AIF360 library in Python. I do get the error 'MemoryError: Unable to allocate 42.7 TiB for an array with shape (46926397440000,) and data type int8', while I have a very small dataset (1000 rows max). This is the code I get…
0
votes
1 answer

Import Error: cannot import 'mdss_bias_scan' from 'aif360.sklearn.metrics'

I would like to use the mdss_bias_scan function of aif360 for detecting the combination of variables that make up the privileged group and the non-privileged group. When I try to import the function: from aif360.sklearn.metrics import mdss_bias_scan…
Amanda
  • 7
  • 1
  • 3
0
votes
1 answer

Bias mitigation AIF 360 DataFrame values must be numerical

I am trying to mitigate bias on the original df by applying Reweighting or Disparate Impact Remover, but I cannot move forward sinceI get a ValueError: DataFrame values must be numerical. Income and gender are integers. binaryLabelDataset =…
Germa
  • 1
  • 2
0
votes
1 answer

A problem in using AIF360 metrics in my code

I am trying to run AI Fairness 360 metrics on skit-learn (imbalanced-learn) algorithms, but I have a problem with my code. The problem is when I apply skit-learn (imbalanced-learn) algorithms like SMOTE, it return a numpy array. While AI Fairness…
0
votes
1 answer

DataFrame object is not callable with AIF360

I encounter TypeError: 'DataFrame' object is not callable with the following. Anyone can help? Thanks. %cd - dataset_orig = df_data_1(protected_attribute_names=['Gender'], privileged_classes=['Male'], features_to_drop=[]) dataset_orig_train,…
Hoshihl
  • 1
  • 2
0
votes
1 answer

Why do I need to provide (un)privileged attribute values for metrics?

I'm using the AI Fairness 360 package to get fairness metrics on a dataset. I've already converted the data to a StandardDataset instance. If I understand correctly, this will change all values of protected attributes to 1 or 0: 1 meaning "belongs…
Willem
  • 976
  • 9
  • 24
0
votes
1 answer

AIF360 reweighing technique example errors

I was trying to run the aif360 reweighing technique from the github link (https://github.com/Trusted-AI/AIF360/blob/master/examples/demo_reweighing_preproc.ipynb). Even though I downloaded all the right files per the instruction. I was unable to…
Yonas Tesh
  • 56
  • 5
0
votes
1 answer

error using aif360 package for bias mitigation

I am revising IBM AIF360 package to resolve bias in data. I installed the package correctly using the command !pip aif360 install in google colab, but after days I was working in my project I got the error described on the bottom, google colab…
Fernando
  • 55
  • 7