ebanalyse / NERDA

Framework for fine-tuning pretrained transformers for Named-Entity Recognition (NER) tasks
MIT License
153 stars 35 forks source link

Are there any ways to check recall and precision in addition to F1-Score? #26

Closed mk0222-deep closed 2 years ago

mk0222-deep commented 2 years ago

Thank you for providing such a helpful library. I have one question

I've installed from PyPI and used the Performance function. Though compute_f1_scores(y_pred, y_true, labels, **kwargs) returns a list of F1 scores, are there any ways to check recall and precision for each tag?

On the official page of Performance, I could not get information to solve the issue.

I appreciate your support.

smaakage85 commented 2 years ago

Sorry for the late reply, but I have been quite busy and been on vacation.

Precision/Recall statistics is not supported in NERDA right now, but it would not take much time to implement (and I am aware, that a lot of people are requesting it).

If you have the time, I encourage you to make a pull request, otherwise I hope to get some time to get it done soon.

smaakage85 commented 2 years ago

Hi again @mk0222-deep :)

With the latest release of NERDA (0.9.6), evaluate_performance() returns precision and recall for all tags.

Also, if you want to compute to compute accuracy, you can just run:

model.evaluate_performance(return_accuracy = True)

I close this issue.

Best, Lars