Configurations can be set in .yml file. See example config.yml on github.
Define reference groups¶
Fairness is always determined in relation to a reference group. By default, aequitas uses the majority group level for a given group as the reference group.
"majority"Define fairness in relation to the majority in a group.
"min_metric"Define fairness in relation to the subgroup with the lowest value on a given metric.
"predefined"Define fairness in relation to groups of your choice.
The predefined reference groups are set in the configuration file.
ref_groups_method: "predefind" reference_groups: "gender": "male" "age_cat": "35-50"
If the input
score column is not binary, you can test the impact of alternative cutoffs on fairness metrics.
Thresholds are set in the configuration file.
thresholds: rank_abs:  rank_pct: [1.0, 5.0, 10.0 ]
rank_abs classify the observations with the top n as 1 and the remainder as 0. With
rank_pct classify the top n percent as 1 and the rest as 0.
fairness_measures: ["FPR Parity", "FNR Parity"]
Disparity is determined in terms of ratios. When the disparity ratio cross the fairness threshold, the decision is deemed unfair on that metric. Notice this is different from the webapp, which is
1 - fairness_threshold
You can manually set attribute columns to be assessed for fairness.
attr_cols: ["zipcode_pct_black", "zipcode_median_income"]
Your project title and goal will be inserted into the report.
project_description: title: "Insert project title" goal: "Insert project goal."
To connect to a database instead of using “–input “, use the db key, credentials, and input_query. These are set in config.yaml.
db: db_credentials: host: your_host database: your_db user: your_user password: your_pass port: 5432
The input query should return a table with score, label_value columns and then each attribute you want to use for bias analysis
input_query: "select id, score, label_value, attribute_1, attribute_2 from results.predictions left join ..."
The output schema is optional, default=public
Note: database functionality is not compatible with csv input.