def calc_specific_accuracy(cause, actual, predicted):
    """Calculate accuracy for a single cause

    Accuracy for a single cause is the number of predictions correctly
    classified with regard to this cause over the entire population.
    Misclassification of other labels among true negative predictions does
    not affect this statistic.

    .. math::
        accuracy = \\frac{TP + TN}{TP + FP + FN + TN}

    Args:
        cause: a label in the actual and predicted series
        actual (pd.Series): true individual level classification
        predicted (pd.Series): individual level prediction

    Returns:
        float
    """
    true_positive = ((actual == cause) & (predicted == cause)).sum()
    true_negative = ((actual != cause) & (predicted != cause)).sum()
    return (true_positive + true_negative) / len(actual)