def fastROC(sorted_positives, sorted_negatives):
    '''
    '''
    
    positives = sorted_positives
    negatives = sorted_negatives
    
    n_pos = len(positives)
    n_neg = len(negatives)
    
    assert len(positives) < len(negatives)
    
    #timer.mark("Starting search sorted")
    indexes = np.searchsorted(negatives,positives)
    #timer.mark("Search time")
    #print "Searched:", len(indexes)
    
    
    tp = (1.0/n_pos) * np.arange(n_pos)
    fn = (1.0/n_neg) * indexes
    
    #timer.mark("ROC computed")
    
    curve = np.array([tp,fn]).transpose()
    
    #print "Curve:",curve.shape
    #print curve

    return curve
dataset/ETHPy150Open bolme/pyvision/src/pyvision/analysis/bee.py/fastROC/original