-
-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Different Classification Reports for IOBES and BILOU #71
Comments
Please show me the evaluation snippet and the data. |
I generated a small example from my dataset:
The results I get:
When I change the scheme to BILOU using the same example and lables above:
I get the same P, R, & F1. However, the report is different. I'm using micro average with both schemes:
This is the evaluate function that uses seqeval:
|
You just forgot to specify def evaluate(y_true, y_pred, scheme, average):
print(precision_score(y_true, y_pred, average=average, mode='strict', scheme=scheme), end='\t')
print(recall_score(y_true, y_pred, average=average, mode='strict', scheme=scheme), end='\t')
print(f1_score(y_true, y_pred, average=average, mode='strict', scheme=scheme))
print(classification_report(y_true, y_pred, digits=3, mode='strict', scheme=scheme))
# IOBES
0.6666666666666666 0.8 0.7272727272727272
precision recall f1-score support
LOC 0.667 0.800 0.727 10
micro avg 0.667 0.800 0.727 10
macro avg 0.667 0.800 0.727 10
weighted avg 0.667 0.800 0.727 10
# BILOU
0.6666666666666666 0.8 0.7272727272727272
precision recall f1-score support
LOC 0.667 0.800 0.727 10
micro avg 0.667 0.800 0.727 10
macro avg 0.667 0.800 0.727 10
weighted avg 0.667 0.800 0.727 10 |
I compared the results of the same model on the same test data with both IOBES and BILOU schemes. I get exactly the same precision, recall, and F1 scores which I expect:
However, I get different classification reports as shown below! Any explanation for this?
BILOU:
IOBES:
My Environment
The text was updated successfully, but these errors were encountered: