gorkaartola commited on
Commit
6b7c88e
1 Parent(s): 94d2567

Update metric_for_tp_fp_samples.py

Browse files
Files changed (1) hide show
  1. metric_for_tp_fp_samples.py +2 -1
metric_for_tp_fp_samples.py CHANGED
@@ -191,7 +191,7 @@ class metric_tp_fp_Datasets(evaluate.Metric):
191
  return results
192
 
193
  #Computes the metric for each prediction strategy##############################################
194
- def _compute(self, predictions, references, prediction_strategies = ['argmax_max']):
195
  """Returns the scores"""
196
  # TODO: Compute the different scores of the metric
197
  predictions = torch.from_numpy(np.array(predictions, dtype = 'float32'))
@@ -202,6 +202,7 @@ class metric_tp_fp_Datasets(evaluate.Metric):
202
  results = {}
203
  for prediction_strategy in prediction_strategies:
204
  prediction_strategy_name = '-'.join(map(str, prediction_strategy))
 
205
  results[prediction_strategy_name] = {}
206
  predicted_labels = self.predict(predictions, prediction_strategy)
207
  samples = [0 for i in range(len(classes))]
 
191
  return results
192
 
193
  #Computes the metric for each prediction strategy##############################################
194
+ def _compute(self, predictions, references, prediction_strategies = ["argmax_max"]):
195
  """Returns the scores"""
196
  # TODO: Compute the different scores of the metric
197
  predictions = torch.from_numpy(np.array(predictions, dtype = 'float32'))
 
202
  results = {}
203
  for prediction_strategy in prediction_strategies:
204
  prediction_strategy_name = '-'.join(map(str, prediction_strategy))
205
+ print(prediction_strategy_name)
206
  results[prediction_strategy_name] = {}
207
  predicted_labels = self.predict(predictions, prediction_strategy)
208
  samples = [0 for i in range(len(classes))]