def _calc_csi(tp: int, fp: int, fn: int) -> float:
    """
    Calculate critical success index defined as. Can be interpreted as accuracy that considers rare events, the class
    that is not rare should be the false class. Values range from [0, 1] where 1 is perfect accuracy?

    :param tp: true positives
    :param fp: false positives
    :param fn: false negatives

    :return:critical success index
    """
    return tp / (tp + fp + fn)