- Adjust classes to abide by naming conventions for attributes.
- Change
ExponentiatedGradient
signature by renaming argumentT
tomax_iter
,eta_mul
toeta0
, and by addingrun_linprog_step
. - API refactoring to separate out different uses of
eps
withinExponentiatedGradient
. It is now solely responsible for setting the L1 norm bound in the optimization (which controls the excess constraint violation beyond what is allowed by theconstraints
object). The other usage ofeps
as the right-hand side of constraints is now captured directly in the moment classes as follows:- Classification moments:
ConditionalSelectionRate
renamed toUtilityParity
and its subclasses have new arguments on the constructor:difference_bound
- for difference-based constraints such as demographic parity differenceratio_bound_slack
- for ratio-based constraints such as demographic parity ratio- Additionally, there's a
ratio_bound
argument which represents the argument previously calledratio
.
- Regression moments:
ConditionalLossMoment
and its subclasses have a new argumentupper_bound
with the same purpose for newly enabled regression scenarios onExponentiatedGradient
. For a comprehensive overview of available constraints refer to the new user guide on fairness constraints for reductions methods.
- Classification moments:
- Renamed several constraints to create a uniform naming convention according
to the accepted metric harmonization proposal:
ErrorRateRatio
renamed toErrorRateParity
, andTruePositiveRateDifference
renamed toTruePositiveRateParity
since the desired pattern is<metric name>Parity
with the exception ofEqualizedOdds
andDemographicParity
.ConditionalSelectionRate
renamed toUtilityParity
.GroupLossMoment
renamed toBoundedGroupLoss
in order to have a descriptive name and for consistency with the paper. Similarly,AverageLossMoment
renamed toMeanLoss
. For a comprehensive overview of available constraints refer to the new user guide on fairness constraints for reductions methods.
- Added
TrueNegativeRateParity
to provide the opposite constraint ofTruePositiveRateParity
to be used with reductions techniques. - Add new constraints and objectives in
ThresholdOptimizer
- Add class
InterpolatedThresholder
to represent the fittedThresholdOptimizer
- Add
fairlearn.datasets
module.
- Handle case where reductions relabeling results in a single class
- Refactor metrics:
- Remove
GroupMetricResult
type in favor of aBunch
. - Rename and slightly update signatures:
metric_by_group
changed togroup_summary
make_group_metric
changed tomake_metric_group_summary
- Add group summary transformers
{difference,ratio,group_min,group_max}_from_group_summary
. - Add factory
make_derived_metric
.
- Remove
- Add new metrics:
- base metrics
{true,false}_{positive,negative}_rate
- group summary metrics
<metric>_group_summary
- derived metrics
<metric>_{difference,ratio,group_min,group_max}
- disparity metrics
{demographic_parity,equalized_odds}_{difference,ratio}
- base metrics
- Remove metrics:
fallout_rate
in favor offalse_positive_rate
miss_rate
in favor offalse_negative_rate
specificity_score
in favor oftrue_negative_rate
- Change from public to private:
mean_{over,under}prediction
and{balanced_,}root_mean_squared_error
changed to the versions with a leading underscore
- Fix warning due to changing default
dtype
when creating an emptypandas.Series
. - Enable
GridSearch
for more than two sensitive features values. - Add new disparity constraints for reductions methods as moments in
fairlearn.reductions
including:TruePositiveRateDifference
- ratio options for all existing constraints in addition to the default, i.e., difference between groups w.r.t. the relevant metric.
- Make
ExponentiatedGradient
require 0-1 labels for classification problems, pending a better solution for Issue 339.
- Changes to
ThresholdOptimizer
:- Separate plotting for
ThresholdOptimizer
into its own plotting function. ThresholdOptimizer
now performs validations duringfit
, and not during__init__
. It also stores the fitted given estimator in theestimator_
attribute.ThresholdOptmizer
is now a scikit-learn meta-estimator, and accepts an estimator through theestimator
parameter. To use a pre-fitted estimator, passprefit=True
.
- Separate plotting for
- Made
_create_group_metric_set_()
private by prepending with_
. Also changed the arguments, so that this routine requires dictionaries for the predictions and sensitive features. This is a breaking change. - Remove
Reduction
base class for reductions methods and replace it withsklearn.base.BaseEstimator
andsklearn.base.MetaEstimatorMixin
. - Remove
ExponentiatedGradientResult
andGridSearchResult
in favor of storing the values and objects resulting from fitting the meta-estimator directly in theExponentiatedGradient
andGridSearch
objects, respectively. - Fix regression in input validation that dropped metadata from
X
if it is provided as apandas.DataFrame
.
- Remove
GroupMetricSet
in favour of acreate_group_metric_set
method - Add basic support for multiple sensitive features
- Refactor
ThresholdOptimizer
to use mixins from scikit-learn - Adjust
scipy
,scikit-learn
, andmatplotlib
requirements to support python 3.8
- Various tweaks to
GroupMetricResult
andGroupMetricSet
for AzureML integration
- If methods such as
predict
are called beforefit
,sklearn
'sNotFittedError
is raised instead ofNotFittedException
, and the latter is now removed.
- Separated out matplotlib dependency into an extension that can be installed
via
pip install fairlearn[customplots]
. - Added a
GroupMetricSet
class to hold collections ofGroupMetricResult
objects
- Fix to determine whether operating as binary classifier or regressor in dashboard
- Initial release of fairlearn dashboard
-
Major changes to the API. In particular the
expgrad
function is now implemented by theExponentiatedGradient
class. Please refer to the ReadMe file for information on how to upgrade -
Added new algorithms
- Threshold Optimization
- Grid Search
-
Added grouped metrics
-
registered the project at PyPI
-
changed how the fairness constraints are initialized (in
fairlearn.moments
), and how they are passed to the fair learning reductionfairlearn.classred.expgrad
- initial release