chakki-works/seqeval

Biomedical named entity evaluation has a problem

minstar opened this issue · 3 comments

image
image

Above of the two examples are the same in the criteria of entity evaluation,
however, it shows different evaluation scores.
Most of the biomedical named entity datasets are composed of the first case.
I think this should be fixed for the further usage of seqeval framework.

Which version are you using?
In addition, you should use a list of lists instead of a list.
The result of the current version(v1.2.2) is the following:

>>> from seqeval.metrics import classification_report
>>> y_true = [['O', 'O', 'B', 'I', 'I', 'I', 'I', 'O']]
>>> y_pred = [['O', 'O', 'B', 'I', 'I', 'B', 'I', 'O']]
>>> print(classification_report(y_true, y_pred))
              precision    recall  f1-score   support
           _       0.00      0.00      0.00         1
   micro avg       0.00      0.00      0.00         1
   macro avg       0.00      0.00      0.00         1
weighted avg       0.00      0.00      0.00         1
>>> y_true = [['O', 'O', 'B-MISC', 'I-MISC', 'I-MISC', 'I-MISC', 'I-MISC', 'O']]
>>> y_pred = [['O', 'O', 'B-MISC', 'I-MISC', 'I-MISC', 'B-MISC', 'I-MISC', 'O']]
>>> print(classification_report(y_true, y_pred))
              precision    recall  f1-score   support
        MISC       0.00      0.00      0.00         1
   micro avg       0.00      0.00      0.00         1
   macro avg       0.00      0.00      0.00         1
weighted avg       0.00      0.00      0.00         1

I was using (v0.0.12)
and this version also has a problem
image
I think I have to update my version. thank you

Your welcome. Have a nice experiment!