lale.lib.aif360.optim_preproc module¶
- class lale.lib.aif360.optim_preproc.OptimPreproc(*, favorable_labels, protected_attributes, unfavorable_labels=None, optimizer=None, optim_options={}, verbose=0, seed=None)¶
Bases:
PlannedIndividualOp
Work-in-progress, not covered in successful test yet: Optimized Preprocessing pre-estimator fairness mitigator. Learns a probabilistic transformation that edits the features and labels in the data with group fairness, individual distortion, and data fidelity constraints and objectives (Calmon et al. 2017).
This documentation is auto-generated from JSON schemas.
- Parameters
favorable_labels (array, >=1 items, not for optimizer) –
Label values which are considered favorable (i.e. “positive”).
items : union type
float
Numerical value.
or string
Literal string value.
or boolean
Boolean value.
or array, >=2 items, <=2 items of items : float
Numeric range [a,b] from a to b inclusive.
protected_attributes (array, >=1 items, not for optimizer) –
Features for which fairness is desired.
items : dict
feature : union type
Column name or column index.
string
or integer
reference_group : array, >=1 items
Values or ranges that indicate being a member of the privileged group.
items : union type
string
Literal value.
or float
Numerical value.
or array, >=2 items, <=2 items of items : float
Numeric range [a,b] from a to b inclusive.
monitored_group : union type, default None
Values or ranges that indicate being a member of the unprivileged group.
None
If monitored_group is not explicitly specified, consider any values not captured by reference_group as monitored.
or array, >=1 items
items : union type
string
Literal value.
or float
Numerical value.
or array, >=2 items, <=2 items of items : float
Numeric range [a,b] from a to b inclusive.
unfavorable_labels (union type, not for optimizer, default None) –
Label values which are considered unfavorable (i.e. “negative”).
None
If unfavorable_labels is not explicitly specified, consider any labels not captured by favorable_labels as unfavorable.
or array, >=1 items
items : union type
float
Numerical value.
or string
Literal string value.
or boolean
Boolean value.
or array, >=2 items, <=2 items of items : float
Numeric range [a,b] from a to b inclusive.
optimizer (union type, not for optimizer, default None) –
Optimizer class.
Any
User-provided.
or None
Use aif360.algorithms.preprocessing.optim_preproc_helpers.opt_tools.OptTools.
optim_options (dict, not for optimizer, default {}) – Options for optimization to estimate the transformation.
verbose (integer, not for optimizer, default 0) – If zero, then no output.
seed (union type, not for optimizer, default None) –
Seed to make transform repeatable.
integer
or None
- fit(X, y=None, **fit_params)¶
Train the operator.
Note: The fit method is not available until this operator is trainable.
Once this method is available, it will have the following signature:
- Parameters
X (array) –
Features; the outer array is over samples.
items : array
items : union type
float
or string
y (union type) –
Target class labels; the array is over samples.
array of items : float
or array of items : string
- transform(X, y=None)¶
Transform the data.
Note: The transform method is not available until this operator is trained.
Once this method is available, it will have the following signature:
- Parameters
X (array) –
Features; the outer array is over samples.
items : array
items : union type
float
or string
- Returns
result – Output data schema for transform.
- Return type
array of items : array of items : float