machine learning - Conditional Random Field feature functions -
i've been reading papers on crfs , confused feature functions. unary (node) , binary (edge) features f of form
f(yc, xc) = 1{yc=y ̃c}fg(xc).
where {.} indicator function evaluating 1 if condition enclosed true, , 0 otherwise. fg function of data xc extracts useful attributes (features) data.
now seems me create crf features true labels (yc) must known. true training testing phase true class labels unknown (since trying determine value).
am missing something? how can correctly implemented?
the idea crf assigns score each setting of labels. do, notionally, compute scores possible label assignments , whichever labeling gets biggest score crf predicts/outputs. going make sense if crf gives different scores different label assignments. when think of way it's clear labels must involved in feature functions work.
so lets log probability function crf f(x,y). assigns number each combination of data sample x , labeling y. when new data sample predicted label during test time argmax_y f(new_x, y). is, find value of y makes f(new_x,y) biggest , that's predicted labeling.