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

Understanding weights in my case for CRF #99

Open
ctrado18 opened this issue Jan 10, 2019 · 0 comments
Open

Understanding weights in my case for CRF #99

ctrado18 opened this issue Jan 10, 2019 · 0 comments

Comments

@ctrado18
Copy link

I have trained a german CRF.
I looked at the feature and weights to analyse why and why not the entity is recognised.

E.g. for this sentences. There it recognises correctly the word 'Leistung' but also ''gezahlt" which I don't want.

'wie viel Leistung bekomm ich gezahlt?'

Then I looked at the features predicting the word 'gezahlt':

features
[('-1:prefix5', 'ich'), ('-1:suffix3', 'ich'), ('0:bias', 'bias'), ('EOS', True)]

here just suffix3 and prefix5.

The individual weights are (feature, weight, label):

-1:prefix5:ich weight:0.255969 label: U-Leistung
-1:prefix5:ich weight:-0.255969 label: O
-1:suffix3:ich weight:0.255969 label: U-Leistung
-1:suffix3:ich weight:-0.255969 label: O
0:bias:bias weight:1.512877 label: O
0:bias:bias weight:-1.512877 label: U-Leistung

SUM WEIGHT LEISTUNG
-1.000939
SUM WEIGHT O
1.000939

This gives in the sum same weights for entitiy Leistung and label O.
But why does the word 'gezahlt' has probability of 77% at the end in prediction?

And I thought negative weights are downgrading the proper label (why is then at all this word an entity)

I hope you can clarify a bit?

@ctrado18 ctrado18 changed the title Understandning weights in my case for CRF Understanding weights in my case for CRF Jan 10, 2019
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