def PPL()

in src/smclarify/bias/metrics/basic_stats.py [0:0]


def PPL(TP: int, FP: int, TN: int, FN: int) -> float:
    r"""
    Proportion of input assigned in positive predicted label.

    :param: TP: Counts of labels which were correctly predicted positive
    :param: FP: Counts of labels which were incorrectly predicted positive
    :param: TN: Counts of labels which were correctly predicted negative
    :param: FN: Counts of labels which were incorrectly predicted negative
    :return: Proportion of inputs assigned the positive predicted label.
    """
    return divide(TP + FP, TN + FP + FN + TP)