(metric, bootstrap_iters)
| 234 | |
| 235 | |
| 236 | def stderr_for_metric(metric, bootstrap_iters): |
| 237 | bootstrappable = [ |
| 238 | median, |
| 239 | matthews_corrcoef, |
| 240 | f1_score, |
| 241 | perplexity, |
| 242 | bleu, |
| 243 | chrf, |
| 244 | ter, |
| 245 | ] |
| 246 | |
| 247 | if metric in bootstrappable: |
| 248 | return lambda x: bootstrap_stderr(metric, x, iters=bootstrap_iters) |
| 249 | |
| 250 | stderr = {mean: mean_stderr, acc_all: acc_all_stderr} |
| 251 | |
| 252 | return stderr.get(metric, None) |
| 253 | |
| 254 | |
| 255 | def yesno(x): |
nothing calls this directly
no test coverage detected