Evaluation scores for spancat model #13038
Closed
ludovicmoncla
started this conversation in
Help: Best practices
Replies: 1 comment 1 reply
-
If you use python -m spacy evaluate MODEL DATA_PATH --spans-key custom_key -o metrics.json (Earlier versions of spacy include the detailed output for the spans key |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am using the spaCy train function for training a spancat model using data labeled with Prodigy.
It seems to work well but I wonder how I can get a more detailed evaluation?
I mean, in addition to SPANS_SC_F, SPANS_SC_P , SPANS_SC_R , SCORE. I am interested in precision and recall for each label individually.
Is there a built-in solution that I missed?
I've tried the Scorer.score_spans() function with examples with a snippet of code found in another discussion:
This is working when used with the default
fr_core_news_sm
model. But it is not working with my custom spancat model (all scores are equal to zero which I know is not normal).Is there something wrong with the use of the spancat model or with the test data format?
I understand from https://spacy.io/api/data-formats#dict-input that I should use
spans
instead ofentities
in the TEST_DATA dictionary but it is not working. I've also tried do changeents
withspans
in thescore_spans()
function without success. I imagine that there is something misleading between NER and spancat. But in my case, the model is trained only withtok2vec
andspancat
in the nlp pipeline.Moreover, how can I use the
Scorer.score_spans()
function with a binary spacy dataset (.spacy file)?Thanks,
Beta Was this translation helpful? Give feedback.
All reactions