0

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 doesn't recognize the dataset which I call to analyze the data, why the installer aif360 package doesn't work, please any idea??

# I am using AIF 360
dataset_orig = GermanDataset(protected_attribute_names=['age'],privileged_classes=[lambda x: x >= 25],features_to_drop=['personal_status', 'sex'] )   
dataset_orig_train, dataset_orig_test = dataset_orig.split([0.7], shuffle=True)
privileged_groups = [{'age': 1}]
unprivileged_groups = [{'age': 0}]
# Error I got
IOError: [Errno 2] File /usr/local/lib/python3.6/dist-packages/aif360/datasets/../data/raw/german/german.data does not exist: '/usr/local/lib/python3.6/dist-packages/aif360/datasets/../data/raw/german/german.data'

To use this class, please download the following files:

    https://archive.ics.uci.edu/ml/machine-learning-databases/statlog/german/german.data
    https://archive.ics.uci.edu/ml/machine-learning-databases/statlog/german/german.doc

and place them, as-is, in the folder:

    /usr/local/lib/python3.6/dist-packages/aif360/data/raw/german

An exception has occurred, use %tb to see the full traceback.

SystemExit: 1
/usr/local/lib/python3.6/dist-packages/IPython/core/interactiveshell.py:2890: UserWarning: To exit: use 'exit', 'quit', or Ctrl-D.
  warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1)
Reveille
  • 4,359
  • 3
  • 23
  • 46
Fernando
  • 55
  • 7

1 Answers1

0

This is easy. All you've to do is download these two files from the link :

https://archive.ics.uci.edu/ml/machine-learning-databases/statlog/german/german.data https://archive.ics.uci.edu/ml/machine-learning-databases/statlog/german/german.doc

and put them in the folder '/usr/local/lib/python3.6/dist-packages/aif360/data/raw/German' and re-run it. It'll work like a charm :).

Yonas Tesh
  • 56
  • 5