ModelingBiasFairnessConfig#
- class datarobotx.ModelingBiasFairnessConfig(bias_mitigation_feature_name=None, bias_mitigation_technique=None, protected_features=None, fairness_metrics_set=None, fairness_threshold=None, include_bias_mitigation_feature_as_predictor_variable=None)#
Bias and Fairness modeling options.
Parameters that default to ‘None’ (or are omitted by the user) are overridden to server-side defaults at runtime. Consult the DataRobot REST API and GUI documentation for additional information on each parameter.
- Parameters:
bias_mitigation_feature_name (str) – The name of the protected feature used to mitigate bias on models.
bias_mitigation_technique ({'preprocessingReweighing', 'postProcessingRejectionOptionBasedClassification'}) – Method applied to perform bias mitigation.
protected_features (list of str) – A list of project feature to mark as protected for Bias metric calculation and Fairness correction. Used and required only if Bias & Fairness in AutoML feature is enabled.
fairness_metrics_set ({'proportionalParity', 'equalParity', 'predictionBalance',) – ‘trueFavorableAndUnfavorableRateParity’, ‘favorableAndUnfavorablePredictiveValueParity’} Metric to use for calculating fairness. Can be one of
proportionalParity
,equalParity
,predictionBalance
,trueFavorableAndUnfavorableRateParity
orFavorableAndUnfavorablePredictiveValueParity
. Used and required only if Bias & Fairness in AutoML feature is enabled.fairness_threshold (float) – Threshold value of the fairness metric. Can be in a range of
[0:1]
. If the actual metric value is below the threshold, the user will be notifiedinclude_bias_mitigation_feature_as_predictor_variable (bool) – Specifies whether the mitigation feature will be used as a predictor variable (i.e., treated like other categorical features in the input to train the modeler), in addition to being used for bias mitigation. If false, the mitigation feature will be used only for bias mitigation, and not for training the modeler task.
See also
DRConfig
Configuration object for DataRobot project and autopilot settings, also includes detailed examples of usage
Attributes:
The name of the protected feature used to mitigate bias on models.
Method applied to perform bias mitigation.
Metric to use for calculating fairness.
Threshold value of the fairness metric.
Specifies whether the mitigation feature will be used as a predictor variable (i.e., treated like other categorical features in the input to train the modeler), in addition to being used for bias mitigation.
A list of project feature to mark as protected for Bias metric calculation and Fairness correction.
Inherited methods:
keys
()- rtype:
to_dict
()Return configuration as a dict.
- property bias_mitigation_feature_name: str#
The name of the protected feature used to mitigate bias on models.
Notes
bias_mitigation_feature_name : str
- property bias_mitigation_technique: str#
Method applied to perform bias mitigation.
Notes
bias_mitigation_technique : {‘preprocessingReweighing’, ‘postProcessingRejectionOptionBasedClassification’}
- property fairness_metrics_set: str#
Metric to use for calculating fairness. Can be one of
proportionalParity
,equalParity
,predictionBalance
,trueFavorableAndUnfavorableRateParity
orFavorableAndUnfavorablePredictiveValueParity
. Used and required only if Bias & Fairness in AutoML feature is enabled.Notes
- fairness_metrics_set{‘proportionalParity’, ‘equalParity’, ‘predictionBalance’,
‘trueFavorableAndUnfavorableRateParity’, ‘favorableAndUnfavorablePredictiveValueParity’}
- property fairness_threshold: float#
Threshold value of the fairness metric. Can be in a range of
[0:1]
. If the actual metric value is below the threshold, the user will be notified.Notes
fairness_threshold : float
- property include_bias_mitigation_feature_as_predictor_variable: bool#
Specifies whether the mitigation feature will be used as a predictor variable (i.e., treated like other categorical features in the input to train the modeler), in addition to being used for bias mitigation. If false, the mitigation feature will be used only for bias mitigation, and not for training the modeler task.
Notes
include_bias_mitigation_feature_as_predictor_variable : bool