MCPcopy
hub / github.com/facebookresearch/MetaCLIP / roc_auc

Function roc_auc

clipeval/eval_zeroshot.py:155–159  ·  view source on GitHub ↗
(outputs, targets)

Source from the content-addressed store, hash-verified

153
154
155def roc_auc(outputs, targets):
156 pos_score = outputs[:, 1] - outputs[:, 0]
157 metric = metrics.roc_auc_score(targets, pos_score)
158
159 return 100 * metric
160
161
162if __name__ == '__main__':

Callers 3

evaluate_logitsFunction · 0.90
evaluate_datasetFunction · 0.90
evaluateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected