def specificity(y_true, y_pred):
    """
    Calculates the specificity.

    .. math::