def accuracy()

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


def accuracy(TP: int, FP: int, TN: int, FN: int) -> float:
    r"""
    Proportion of inputs assigned the correct predicted label by the model.

    :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 correct predicted label by the model.
    """
    return divide(TN + TP, TN + FP + FN + TP)