(
    favorable_labels, protected_attributes, unfavorable_labels=None, fairness_weight=0.5
)
return _R2AndDisparateImpact(
        favorable_labels, protected_attributes, unfavorable_labels, fairness_weight
    )
Create a scikit-learn compatible combined scorer for `R2 score`_
    and `symmetric disparate impact`_ given the fairness info.
    The scorer is suitable for regression problems,
    with higher resulting scores indicating better outcomes.
    It first scales R2, which might be negative, to be between 0 and 1.
    Then, the result is a linear combination of the scaled R2 and
    symmetric disparate impact, and is also between 0 and 1.
    This metric can be used as the `scoring` argument
    of an optimizer such as `Hyperopt`_.

    .. _`R2 score`: https://scikit-learn.org/stable/modules/generated/sklearn.metrics.r2_score.html
    .. _`symmetric disparate impact`: lale.lib.aif360.util.html#lale.lib.aif360.util.symmetric_disparate_impact
    .. _`Hyperopt`: lale.lib.lale.hyperopt.html#lale.lib.lale.hyperopt.Hyperopt
Create a scikit-learn compatible combined scorer for `R2 score`_
    and `symmetric disparate impact`_ given the fairness info.
    The scorer is suitable for regression problems,
    with higher resulting scores indicating better outcomes.
    It first scales R2, which might be negative, to be between 0 and 1.
    Then, the result is a linear combination of the scaled R2 and
    symmetric disparate impact, and is also between 0 and 1.
    This metric can be used as the `scoring` argument
    of an optimizer such as `Hyperopt`_.
Create a scikit - learn compatible combined scorer for R2 score _ and symmetric disparate impact _ given the fairness info . The scorer is suitable for regression problems with higher resulting scores indicating better outcomes . It first scales R2 which might be negative to be between 0 and 1 . Then the result is a linear combination of the scaled R2 and symmetric disparate impact and is also between 0 and 1 . This metric can be used as the scoring argument of an optimizer such as Hyperopt _ .
def r2_and_disparate_impact(
    favorable_labels, protected_attributes, unfavorable_labels=None, fairness_weight=0.5
):
    """
    Create a scikit-learn compatible combined scorer for `R2 score`_
    and `symmetric disparate impact`_ given the fairness info.
    The scorer is suitable for regression problems,
    with higher resulting scores indicating better outcomes.
    It first scales R2, which might be negative, to be between 0 and 1.
    Then, the result is a linear combination of the scaled R2 and
    symmetric disparate impact, and is also between 0 and 1.
    This metric can be used as the `scoring` argument
    of an optimizer such as `Hyperopt`_.

    .. _`R2 score`: https://scikit-learn.org/stable/modules/generated/sklearn.metrics.r2_score.html
    .. _`symmetric disparate impact`: lale.lib.aif360.util.html#lale.lib.aif360.util.symmetric_disparate_impact
    .. _`Hyperopt`: lale.lib.lale.hyperopt.html#lale.lib.lale.hyperopt.Hyperopt"""
    return _R2AndDisparateImpact(
        favorable_labels, protected_attributes, unfavorable_labels, fairness_weight
    )
def r2_and_disparate_impact ( favorable_labels , protected_attributes , unfavorable_labels = None , fairness_weight = 0.5 ) : return _R2AndDisparateImpact ( favorable_labels , protected_attributes , unfavorable_labels , fairness_weight )