@songying
2020-05-06T10:07:55.000000Z
字数 589
阅读 1164
python库
pip install seqeval[cpu]
pip install seqeval[gpu]
from seqeval.metrics import accuracy_score
from seqeval.metrics import classification_report
from seqeval.metrics import f1_score
metrics | description |
---|---|
accuracy_score(y_true, y_pred) | Compute the accuracy. |
precision_score(y_true, y_pred) | Compute the precision. |
recall_score(y_true, y_pred) | Compute the recall. |
f1_score(y_true, y_pred) | Compute the F1 score, also known as balanced F-score or F-measure. |
classification_report(y_true, y_pred, digits=2) | Build a text report showing the main classification metrics. ^{} is number of digits for formatting output floating point values. Default value is ^{}. |