Hello there. These are great applications, thank you for all of the effort and support.
I'm creating spancats on multiple types of documents, but looking for the same labels across them. For both ease of annotation and to see if it would make much of a difference, I've trained each one separately. When I evaluate each one independently, I'm getting good R,P, and F scores, but when I merge them, I'm losing entire labels. What's really odd, is that both of the datasets have annotations for "PATIENT" and "DOB" - if I was losing labels that only appear in one (e.g. ENCDATE) I would, maybe, understand. I have 27 different "databases" -- but to simplify what I'm seeing, I've reproduced it with 2.
My evaluation of the first "allergy" documents:
My evaluation of the second "audiology" documents:
The command I'm using to merge the data:
prodigy db-merge FAX_ALLERGY,FAX_AUDIOLOGY FAX_MERGED_AUDIOLOGY_ALLERGY
Q: Does the order matter?
I'm then converting to spacy:
python -m prodigy data-to-spacy spacy --spancat FAX_MERGED_AUDIOLOGY_ALLERGY --eval-split 0.2 --verbose
Then training:
python -m spacy train spacy/config.cfg --output ./model --paths.train spacy/train.spacy --paths.train spacy/train.spacy --paths.dev spacy/dev.spacy --gpu-id 0 --verbose
Then evaluating:
python -m spacy evaluate ./model/model-best ./spacy/dev.spacy --spans-key PATIENT,DOB,MRN,SSN,INSPOLN,INSGRPN,EMAIL,PHONE,ENCDATE,CLAIMN -o ./evaluation.json
The output of evaluation.json on the combined model:
I'm losing labels -- what am I doing incorrectly (or simply don't understand)?
Note: When I combined all 27 databases, I lose fewer labels, but I'm still losing some, which is less than ideal.
Thanks in advance! I'm sure this is PEBKAC, but I've been playing around for a few days and I'm stuck.