# Confidence score for NER model

**URL:** <https://discuss.huggingface.co/t/confidence-score-for-ner-model/20723>\
**Category:** Beginners\
**Created:** [July 22, 2022, 2:09pm UTC](https://discuss.huggingface.co/t/confidence-score-for-ner-model/20723 "2022-07-22T14:09:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zahra196](https://avatars.discourse-cdn.com/v4/letter/z/35a633/32.png) [@zahra196](https://discuss.huggingface.co/u/zahra196)\
**Post date:** [July 22, 2022, 2:09pm UTC](https://discuss.huggingface.co/t/confidence-score-for-ner-model/20723/1 "2022-07-22T14:09:15Z")

</div>

Hi everyone,

I need to calculate the confidence score for predictions of a NER- BERT model. I know how to get the probability of the predictions for each token, but I need a score for a complete span after aggregation if the named entity has more than one token (I mean there are also some tokens with I-tags). I would like to know what is a good way to calculate such scores? is it ok to multiply the confidence scores of the first and last tokens in the span?

Many thanks for your help 🙂

---

<div class="post-metadata">

**Author:** ![yellowstone02](https://avatars.discourse-cdn.com/v4/letter/y/dc4da7/32.png) [@yellowstone02](https://discuss.huggingface.co/u/yellowstone02)\
**Post date:** [May 31, 2023, 2:30pm UTC](https://discuss.huggingface.co/t/confidence-score-for-ner-model/20723/2 "2023-05-31T14:30:48Z")

</div>

Could you find a solution to your problem, @zahra196? I am wondering the same thing and am trying to think of a solution.
