04cd555be76efc7baced753c751c4257d41eb75d,EvalMetrics.py,,ErrorRateAt95Recall,#,10
Before Change
sorted_scores.sort(key=operator.itemgetter(1), reverse=False)
// Compute error rate
n_match = sum(1 for x in sorted_scores if x[0] == 1)
n_thresh = recall_point * n_match
tp = 0
count = 0
for label, score in sorted_scores:
After Change
FP = np.sum(labels[:threshold_index] == 0) // Below threshold (i.e., labelled positive), but should be negative
TN = np.sum(labels[threshold_index:] == 0) // Above threshold (i.e., labelled negative), and should be negative
return float(FP) / float(FP + TN)
"""import operator
def ErrorRateAt95Recall(labels, scores):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: DagnyT/hardnet
Commit Name: 04cd555be76efc7baced753c751c4257d41eb75d
Time: 2017-07-27
Author: ducha.aiki@gmail.com
File Name: EvalMetrics.py
Class Name:
Method Name: ErrorRateAt95Recall
Project Name: jindongwang/transferlearning
Commit Name: f0fe1d57b54b7670ad4586e19d4383db561e84e7
Time: 2019-12-16
Author: jindongwang@outlook.com
File Name: code/deep/DDC_DeepCoral/mmd.py
Class Name: MMD_loss
Method Name: linear_mmd2
Project Name: jindongwang/transferlearning
Commit Name: f0fe1d57b54b7670ad4586e19d4383db561e84e7
Time: 2019-12-16
Author: jindongwang@outlook.com
File Name: code/distance/mmd.py
Class Name:
Method Name: linear_mmd2