예제 #1
0
 def f1_risk(predictions, targets):
     scores = f1_score(predictions, targets, average=False)
     assert all([0 <= s <= 1.0 for s in scores])
     return [1 - s for s in scores]
예제 #2
0
 def f1_risk(predictions, targets):
     scores = f1_score(predictions, targets, average=False)
     return [1 - s for s in scores]