Skip to content

Commit

Permalink
Add race to categorical features in the example (Trusted-AI#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
chajath authored Mar 6, 2020
1 parent 204cac9 commit 5d3441e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions aif360/datasets/adult_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,12 @@ def __init__(self, label_name='income-per-year',
>>> label_map = {1.0: '>50K', 0.0: '<=50K'}
>>> protected_attribute_maps = [{1.0: 'Male', 0.0: 'Female'}]
>>> ad = AdultDataset(protected_attribute_names=['sex'],
... categorical_features=['workclass', 'education', 'marital-status',
... 'occupation', 'relationship', 'native-country', 'race'],
... privileged_classes=[['Male']], metadata={'label_map': label_map,
... 'protected_attribute_maps': protected_attribute_maps})
Note that we are now adding `race` as a `categorical_features`.
Now this information will stay attached to the dataset and can be
used for more descriptive visualizations.
"""
Expand Down

0 comments on commit 5d3441e

Please sign in to comment.