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

Custom Loss : #7

Open
3rdCore opened this issue Nov 18, 2021 · 1 comment
Open

Custom Loss : #7

3rdCore opened this issue Nov 18, 2021 · 1 comment

Comments

@3rdCore
Copy link

3rdCore commented Nov 18, 2021

No description provided.

@3rdCore
Copy link
Author

3rdCore commented Nov 18, 2021

Hello,
I am currently using your package as part of an academic project, and I would like to know if you could help me to figure out how to implement a custom loss that will penalize mis-classification of certain tags.

I implemented a NER model for BILOU tagging (Begin, Inside, Last, Outside, Unit), but my dataset is quite unbalanced as it contains 80% of Outside tags, hence I wanted to penalize a mis-classsification of rare tags using that custom loss in order to force the model to pay more attention to rare tags (BILU).

Do you think that could be possible, as the crf_log_likelihood seems to be hardcoded and specific to CRF models.

Thanks for your time,
Tom

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