import math


def classif_error(f, a=1.):
    """Gives the theoretical error given a frontier f that separates positives and negatives."""
    a = float(a)
    return (1 - a) / 2 + (a / 2) * math.pow(abs(2 * f - 1), 1 / a)