Systemy_dialogowe/evaluate/evaluate.ipynb
2022-04-26 18:33:20 +02:00

6.3 KiB
Raw Blame History

import pandas as pd
from sklearn.metrics import accuracy_score
expected = pd.read_csv('evaluate.tsv', sep='\t', header=None)
expected = expected.fillna('null')
expected
0
0 hello
1 help
2 request
3 affirm
4 request
... ...
586 null
587 request
588 null
589 ack
590 hello

591 rows × 1 columns

predicted = pd.read_csv('predicted.tsv', sep='\t', header=None)
predicted = predicted.fillna('null')
predicted
0
0 hello
1 help
2 request
3 affirm
4 request
... ...
586 null
587 request
588 null
589 ack
590 hello

591 rows × 1 columns

print(accuracy_score(expected, predicted))
1.0