a490a1e41a8d3a4547fa0a46e12cf0584431e520,mir_eval/structure.py,,pairwise,#Any#Any#Any#Any#Any#Any#,69
Before Change
// Construct the frame label-agreement matrix (estimated)
agree_est = np.equal.outer(y_est, y_est)
agree_est = agree_est[idx]
// Find the pairs in agreement
matches = float((agree_ref & agree_est).sum())
precision = matches / agree_est.sum()
After Change
matches = 0.0
n_agree_ref = 0.0
n_agree_est = 0.0
for i in xrange(len(y_ref)):
for j in xrange(i + 1, len(y_ref)):
// Do i and j match in reference?
ref_match = (y_ref[i] == y_ref[j])
n_agree_ref += ref_match
// Or in estimate?
est_match = (y_est[i] == y_est[j])
n_agree_est += est_match
// If both, we have agreement
matches += (ref_match & est_match)
precision = matches / n_agree_est
recall = matches / n_agree_ref
f_measure = util.f_measure(precision, recall, beta=beta)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: craffel/mir_eval
Commit Name: a490a1e41a8d3a4547fa0a46e12cf0584431e520
Time: 2014-04-17
Author: brm2132@columbia.edu
File Name: mir_eval/structure.py
Class Name:
Method Name: pairwise
Project Name: nipy/dipy
Commit Name: bf072f5c988de4212156b1a53586a8dcb028f402
Time: 2011-07-20
Author: Bago.Amirbekian@ucsf.edu
File Name: dipy/reconst/dti.py
Class Name: Tensor
Method Name: _getD
Project Name: craffel/mir_eval
Commit Name: a490a1e41a8d3a4547fa0a46e12cf0584431e520
Time: 2014-04-17
Author: brm2132@columbia.edu
File Name: mir_eval/structure.py
Class Name:
Method Name: pairwise
Project Name: librosa/librosa
Commit Name: 93d4bf7e8cc152e133c48f424be1317522dda61d
Time: 2015-01-16
Author: ebattenberg@gracenote.com
File Name: librosa/core/constantq.py
Class Name:
Method Name: cqt