(slope, hull, tol=1e-5)
return np.flatnonzero((dist - mindist) <= tol)
Return the indices where a line with `slope` touches the ROC convex hull.
Return the indices where a line with `slope` touches the ROC convex hull.
Return the indices where a line with slope touches the ROC convex hull .
def roc_iso_performance_line(slope, hull, tol=1e-5):
    """
    Return the indices where a line with `slope` touches the ROC convex hull.
    """
    fpr, tpr, *_ = hull

    # Compute the distance of each point to a reference iso line
    # going through point (0, 1). The point(s) with the minimum
    # distance are our result

    # y = m * x + 1
    # m * x - 1y + 1 = 0
    a, b, c = slope, -1, 1
    dist = distance_to_line(a, b, c, fpr, tpr)
    mindist = np.min(dist)

    return np.flatnonzero((dist - mindist) <= tol)
def roc_iso_performance_line ( slope , hull , tol = 1e-5 ) : fpr , tpr , * _ = hull # Compute the distance of each point to a reference iso line # going through point (0, 1). The point(s) with the minimum # distance are our result # y = m * x + 1 # m * x - 1y + 1 = 0 a , b , c = slope , - 1 , 1 dist = distance_to_line ( a , b , c , fpr , tpr ) mindist = np . min ( dist ) return np . flatnonzero ( ( dist - mindist ) <= tol )