def calc_auc(x, y):
    ' Given x and y values it calculates the approx. integral and normalizes it: area under curve'
    integral = np.trapz(y, x)
    norm = np.trapz(np.ones_like(y), x)
    return (integral / norm)
Given x and y values it calculates the approx. integral and normalizes it: area under curve
def calc_auc(x, y):
    ' '
    integral = np.trapz(y, x)
    norm = np.trapz(np.ones_like(y), x)
    return (integral / norm)