Extraction features turn documents into fields: an invoice into vendor, number, date, amount, tax ID and category. One accuracy number hides which fields are broken. Score each field separately:
- True positive: the prediction is filled and equals the gold value.
- False positive: the prediction is filled and wrong, or filled when the gold is empty.
- False negative: the gold is filled and the prediction is empty or wrong.
A wrong value is both a false positive and a false negative. Precision says how often a filled field can be trusted; recall says how much of the real data was captured; F1 balances the two.
For a field with fixed values, such as the expense category, a confusion matrix shows which values get mixed up.
Your task
Score 60 labelled invoices. On submit your code also runs on 40 invoices you have not seen, with more empty fields.