reweighing: Reweighing

Description Usage Arguments Examples

View source: R/preprocessing_reweighing.R

Description

Reweighing is a preprocessing technique that weights the examples in each (group, label) combination differently to ensure fairness before classification

Usage

1
reweighing(unprivileged_groups, privileged_groups)

Arguments

unprivileged_groups

a list with two values: the column of the protected class and the value indicating representation for unprivileged group

privileged_groups

a list with two values: the column of the protected class and the value indicating representation for privileged group

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
# An example using the Adult Dataset
load_aif360_lib()
ad <- adult_dataset()
p <- list("race", 1)
u <- list("race", 0)
rw <- reweighing(u,p)
rw$fit(ad)
ad_transformed <- rw$transform(ad)
ad_fit_transformed <- rw$fit_transform(ad)

## End(Not run)

SSaishruthi/trial documentation built on April 30, 2020, 12:06 a.m.