-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.py
75 lines (62 loc) · 1.78 KB
/
constants.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
from aequitas.flow.datasets import BankAccountFraud, FolkTables
from aequitas.flow.datasets.baf import (
VARIANTS as BAF_VARIANTS,
SENSITIVE_COLUMN as BAF_SENSITIVE_COLUMN,
CATEGORICAL_COLUMNS as BAF_CATEGORICAL_COLUMNS,
LABEL_COLUMN as BAF_LABEL_COLUMN,
)
from aequitas.flow.datasets.folktables import (
VARIANTS as FT_VARIANTS,
SENSITIVE_COLUMN as FT_SENSITIVE_COLUMN,
CATEGORICAL_COLUMNS as FT_CATEGORICAL_COLUMNS,
LABEL_COLUMNS as FT_LABEL_COLUMNS,
BOOL_COLUMNS as FT_BOOL_COLUMNS,
)
ABBREVIATIONS = {"BankAccountFraud": "baf", "FolkTables": "acs"}
CLASSES = {"BankAccountFraud": BankAccountFraud, "FolkTables": FolkTables}
NOISE_TYPES = {
"I": [(0, 0), (5, 5), (10, 10), (20, 20)],
"II": [(0, 0), (0, 5), (0, 10), (0, 20)],
"III": [(5, 0), (5, 5), (5, 10), (5, 20)],
}
MARKERS = {0: "*", 1: "o", 2: "s", 3: "v"}
METRICS = {"Demographic Parity": "pprev_ratio", "TPR": "tpr"}
COLORS = {
"lightgbm": "tab:blue",
"OBNC": "tab:orange",
"Fair-OBNC": "tab:green",
"DataRepairer": "tab:red",
"PrevalenceSampling": "tab:purple",
"Massaging": "tab:brown",
"CorrelationSuppression": "tab:pink",
"FeatureImportanceSuppression": "tab:gray",
}
VARIANTS = {
"BankAccountFraud": BAF_VARIANTS,
"FolkTables": FT_VARIANTS,
}
SENSITIVE_COLUMN = {
"BankAccountFraud": BAF_SENSITIVE_COLUMN,
"FolkTables": FT_SENSITIVE_COLUMN,
}
CATEGORICAL_COLUMNS = {
"BankAccountFraud": BAF_CATEGORICAL_COLUMNS,
"FolkTables": FT_CATEGORICAL_COLUMNS,
}
LABEL_COLUMN = {
"BankAccountFraud": BAF_LABEL_COLUMN,
"FolkTables": FT_LABEL_COLUMNS,
}
BOOL_COLUMNS = {"FolkTables": FT_BOOL_COLUMNS}
NOISE_RATES = [
(0, 0),
(5, 5),
(10, 10),
(20, 20),
(0, 5),
(0, 10),
(0, 20),
(5, 0),
(5, 10),
(5, 20),
]