(predictions, labels, examples)
| 32 | |
| 33 | |
| 34 | def accuracy_metric(predictions, labels, examples): |
| 35 | count = 0 |
| 36 | num_predictions = max(len(predictions), 1) |
| 37 | assert len(predictions) == len(labels) |
| 38 | for prediction, label in zip(predictions, labels): |
| 39 | count += prediction == label |
| 40 | return count * 100.0 / num_predictions |
| 41 | |
| 42 | |
| 43 | def f1_metric(predictions, labels, examples): |
nothing calls this directly
no outgoing calls
no test coverage detected