Biomedical named entity evaluation has a problem
minstar opened this issue · 3 comments
minstar commented
Hironsan commented
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
minstar commented
Hironsan commented
Your welcome. Have a nice experiment!