Score() on Test Dataset / Low F-score Ner training #7442
-
|
Hello, I am trying to train a custom NER recognizer that would work on Resumes (with +/- 15 new entity tags). However, I am getting a relatively low F-Score (0.63). Is there any way to use the Scorer ([https://spacy.io/api/scorer#_title]) directly on the test dataset used to train the model, so that I can verify which particular entities work better and which ones don't? I would like to be able to evaluate what works, because I just almost doubled the amount of training data for my model without seeing a significant improvement to my model's f-score. (65 000 words --> 0.60 F-Score, 112 000 words --> 0.63) I can already see by testing a little that it seems that my 'STUDIES' tag that aims to find the field in which someone did his/her studies has problems that I don't understand. I finds well the expected values but it also gets wrongly matched on random punctuation such as : "/ ? / . / etc. Else, I'd also take some general advice to improve my model. Here is the config file I am using : `[paths] [system] [nlp] [components] [components.ner] [components.ner.model] [components.ner.model.tok2vec] [components.transformer] [components.transformer.model] [components.transformer.model.get_spans] [components.transformer.model.tokenizer_config] [corpora] [corpora.dev] [corpora.train] [training] [training.batcher] [training.logger] [training.optimizer] [training.optimizer.learn_rate] [training.score_weights] [pretraining] [initialize] [initialize.components] [initialize.tokenizer]` |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You can run You could also write your own custom evaluation by comparing the predicted entities to the gold-standard ones - there's some related example code from the Prodigy forum here: https://support.prodi.gy/t/show-false-negative-false-positives-in-ner/3223/5
Predicting named entities from resumes might generally be a bit challenging, as you often don't have a lot of context or syntax/grammar in the text. I have no idea what the expected upperbound for this type of prediction would be to be honest... |
Beta Was this translation helpful? Give feedback.
-
|
Hello, I'm also working on a similar NER project. Can you share the steps training of ner on customised data and the code if possible? Also, can you share how to compute accuracy of trained ner model in spacy 3? Please share any source or code with reference to that. Thank you |
Beta Was this translation helpful? Give feedback.
You can run
scorer.scoreon a list ofExampleobjects, though that will only give you the precision/recall/F-scores. If you just want some example cases to look at, you could take a fixed part of your test set, run each example throughscorer.score([example])and only print those where precision and recall are not 100% (or something such).You could also write your own custom evaluation by comparing the predicted entities to the gold-standard ones - there's some related example cod…