0d78d2a33bb152be3ba5d49dad3433472b0cf9f1,mir_eval/boundary.py,,detection,#Any#Any#Any#Any#Any#,46

Before Change


    precision   = np.mean(dist.max(axis=0))

    // Recall: how many of the intervals did we catch?
    recall      = np.mean(dist.max(axis=1))

    // And the f-measure
    f_measure   = util.f_measure(precision, recall, beta=beta)

After Change


    
    skew_adjacency  = np.zeros((n_ref + n_est, n_ref + n_est), dtype=np.int32)
    window_match    = np.abs(np.subtract.outer(reference_boundaries, estimated_boundaries)) <= window
    window_match    = window_match.astype(int)
    
    // L. Lovasz On determinants, matchings and random algorithms. 
    // In L. Budach, editor, Fundamentals of Computation Theory, pages 565-574. Akademie-Verlag, 1979.
    //
    // If we build the skew-symmetric adjacency matrix 
    // D[i, n_ref+j] = 1 <=> ref[i] within window of est[j]
    // D[n_ref + j, i] = -1 <=> same
    //
    // then rank(D) = 2 * maximum matching
    //
    skew_adjacency[:n_ref, n_ref:] = window_match
    skew_adjacency[n_ref:, :n_ref] = -window_match.T
    
    matching_size = np.linalg.matrix_rank(skew_adjacency) / 2.0
    
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: craffel/mir_eval
Commit Name: 0d78d2a33bb152be3ba5d49dad3433472b0cf9f1
Time: 2014-04-15
Author: brm2132@columbia.edu
File Name: mir_eval/boundary.py
Class Name:
Method Name: detection


Project Name: dPys/PyNets
Commit Name: 449ce796e6f506a28075f16099c986e298141569
Time: 2017-11-12
Author: dpisner@utexas.edu
File Name: pynets/nodemaker.py
Class Name:
Method Name: gen_network_parcels


Project Name: ilastik/ilastik
Commit Name: 3772672fff834cb3ea56bb4c81eed95ce8168e51
Time: 2013-04-08
Author: anna.kreshuk@iwr.uni-heidelberg.de
File Name: ilastik/applets/thresholdTwoLevels/opThresholdTwoLevels.py
Class Name: OpSelectLabels
Method Name: execute