Skip to content
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

questions about evaluation #28

Open
hlee-top opened this issue Nov 25, 2021 · 0 comments
Open

questions about evaluation #28

hlee-top opened this issue Nov 25, 2021 · 0 comments

Comments

@hlee-top
Copy link

hlee-top commented Nov 25, 2021

Regarding the accuracy of calculating the trigger word, why is it correct to only calculate the B-Tags and i-Tags separately, and not to parse the BIO tags?
Looking forward for your response, thank you!

def calculate_report(self, y, y_, transform=True):
'''
calculating F1, P, R
:param y: golden label, list
:param y_: model output, list
:return:
'''
if transform:
for i in range(len(y)):
for j in range(len(y[i])):
y[i][j] = self.voc_i2s[y[i][j]]
for i in range(len(y_)):
for j in range(len(y_[i])):
y_[i][j] = self.voc_i2s[y_[i][j]]
return precision_score(y, y_), recall_score(y, y_), f1_score(y, y_)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant