bb1de9e2b0efaf35b4b537ca9dfce9e96f30cf96,mir_eval/hierarchy.py,,_gauc,#Any#Any#Any#Any#,146

Before Change


            // Non-transitive: count comparisons only across immediate levels
            ref_rank = np.equal.outer(ref_score, ref_score + 1)

        est_rank = np.greater.outer(est_score, est_score)

        // Don"t count the query as a result
        // when query < window, query itself is the index within the slice
        // otherwise, query is located at the center of the slice, window
        // (this also holds when the slice goes off the end of the array.)
        idx = min(query, window)
        ref_rank[idx, :] = False
        ref_rank[:, idx] = False

        // Compute normalization constant
        normalizer = float(ref_rank.sum())

        // Add up agreement for frames
        if normalizer > 0:
            score += np.sum(np.logical_and(ref_rank, est_rank)) / normalizer
            num_frames += 1

    // Normalize by the number of frames counted.
    // If no frames are counted, take the convention 0/0 -> 0

After Change


        idx = min(query, window)

        ref_score = np.concatenate((ref_score[:idx], ref_score[idx+1:]))
        est_score = np.concatenate((est_score[:idx], est_score[idx+1:]))

        inversions, normalizer = _compare_frame_rankings(ref_score, est_score,
                                                         transitive=transitive)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: craffel/mir_eval
Commit Name: bb1de9e2b0efaf35b4b537ca9dfce9e96f30cf96
Time: 2017-08-18
Author: bmcfee@users.noreply.github.com
File Name: mir_eval/hierarchy.py
Class Name:
Method Name: _gauc


Project Name: huazhengwang/BanditLib
Commit Name: 00bfbf96d7c9bcd8653edff6749556719115f3ee
Time: 2017-11-15
Author: bjw4ph@virginia.edu
File Name: lib/CoLin.py
Class Name: AsyCoLinUCBUserSharedStruct
Method Name: updateParameters


Project Name: hmmlearn/hmmlearn
Commit Name: 0ed87cd7846d0573e93ae005dba3d1d0c7eb5588
Time: 2016-02-25
Author: anntzer.lee@gmail.com
File Name: hmmlearn/hmm.py
Class Name: GaussianHMM
Method Name: _accumulate_sufficient_statistics