-
Notifications
You must be signed in to change notification settings - Fork 296
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
features.add_feature_edge( lambda y_, y: 0 ) #3
Comments
I cannot remember why I wrote the line ... I guess it is because I did for a sample skeleton, maybe ... :D |
BTW, which algorithm did you apply to calculate the gradient_likelihood function? |
No. I reckon it needs no specific algorithm to calculate the gradient of likelihood on CRF because it has a closed form. |
Hey! could you say it more detailed ,and I'm not similar with it. Thanks! |
I fixed it like this: pre_y =''
for j,label in enumerate(features.labels): #label for a line
for token in tokens:
features.add_feature( lambda x, y, l=label, t=token: 1 if y==l and x[0]==t else 0 )
# def self.features.append(f) .
for info in infos:
features.add_feature( lambda x, y, l=label, i=info: 1 if y==l and x[1]==i else 0 )
if j:
features.add_feature_edge( lambda y_, y,p=pre_y,l=label: 1 if y_==p and y==l else 0 )
pre_y=label |
Hey, pal! there is a little problem in function _calc_fmlist which didnt take positions into consideration |
Sutton's CRF tutorial introduced the gradient of the likelihood. |
Thanks! BTW, which difference(違い) is used by The gradient is computation? |
Like what problem? |
is the gradient computed using differences ? |
What are "differences"? |
Hi,shuyo! I have some questions |
Hey, shuyo! the 351 line in crf.py :features.add_feature_edge( lambda y_, y: 0 ) , is there a problem? THX!!!
The text was updated successfully, but these errors were encountered: