themis-ml
themis-ml copied to clipboard
Implement "Sampling" fairness-aware preprocessing
Sampling is composed of two methods:
Uniform Sampling
- uniformly sample (with replacement)
n
observations from each group, wheren
is the expected size of that group assuming a uniform distribution (conditioned on the protected classs
).
Preferential Sampling
- sample observations using a ranker
R
, similar to the massaging method. - the procedure is to duplicate the top-ranked
X_s1_y+
andX_s0_y–
while removing top-rankedX_s1_y–
andX_s0_y+
.