shuyo / iir

Machine Learning / Natural Language Processing / Information Retrieval
http://shuyo.wordpress.com/
710 stars 298 forks source link

my question #2

Open goog opened 12 years ago

goog commented 12 years ago

Hey,pal! I couldnt find your email on github, so do like this to ask for help. I'm interesting in CRF so want to code it in python. I'm reading your code and i'm a newbie to CRF. Could you give me a flow diagram or add something more detailed about parameters(I cannt match them to math functions). Any guidance would be greatly appreciated. Thanks very much in advance!

shuyo commented 12 years ago

As I can not lecture a general information on CRF here...

This implementation has 2 type of parameters, feature vectors and regularization (none/L1/L2 and the inverse of regularity). The feature vectors are specified as list of function objects which return binary value(0 or 1), and consist on 2 type feature, f(y_{i-1}, y_i) and g(y_i, x_i) (see the below link)

http://www.slideshare.net/shuyo/crf-web/29 (Although it is written in Japanese, the graphical model is universal :D)

The 'main' method on crf.py is a sample code to use CRF class. I am happy you to read it. Thanks.

goog commented 12 years ago

Hi! which formula does the gradient_likelihood() function apply, the expectation here I can't understand it . It seems unlike to the one in P30.(1) in your PPT. or If possible ,please write the gradient_likelihood() formulas to my mail. Thanks very much!!!