illorca commited on
Commit
c5ffe88
·
1 Parent(s): 066589e

Debugging ratios

Browse files
Files changed (1) hide show
  1. FairEval.py +3 -2
FairEval.py CHANGED
@@ -173,7 +173,7 @@ class FairEvaluation(evaluate.Metric):
173
  # (4) SELECT OUTPUT MODE AND REFORMAT AS SEQEVAL-HUGGINGFACE OUTPUT
174
  # initialize empty dictionary and count errors
175
  output = {}
176
- # control the divider for the error_format (count, proportion over total errors or over total entities)
177
  if error_format == 'count':
178
  trad_divider = 1,
179
  fair_divider = 1,
@@ -185,7 +185,8 @@ class FairEvaluation(evaluate.Metric):
185
  fair_divider = results['overall']['fair']['FP'] + results['overall']['fair']['FN'] + \
186
  results['overall']['fair']['LE'] + results['overall']['fair']['BE'] + \
187
  results['overall']['fair']['LBE']
188
-
 
189
 
190
  # assert valid options
191
  assert mode in ['traditional', 'fair', 'weighted'], 'mode must be \'traditional\', \'fair\' or \'weighted\''
 
173
  # (4) SELECT OUTPUT MODE AND REFORMAT AS SEQEVAL-HUGGINGFACE OUTPUT
174
  # initialize empty dictionary and count errors
175
  output = {}
176
+ # control the denominator for the error_format (count, proportion over total errors or over total entities)
177
  if error_format == 'count':
178
  trad_divider = 1,
179
  fair_divider = 1,
 
185
  fair_divider = results['overall']['fair']['FP'] + results['overall']['fair']['FN'] + \
186
  results['overall']['fair']['LE'] + results['overall']['fair']['BE'] + \
187
  results['overall']['fair']['LBE']
188
+ print("trad_divider",trad_divider)
189
+ print("fair_divider",fair_divider)
190
 
191
  # assert valid options
192
  assert mode in ['traditional', 'fair', 'weighted'], 'mode must be \'traditional\', \'fair\' or \'weighted\''