larsmans / seqlearn

Sequence learning toolkit for Python

Home Page:http://larsmans.github.io/seqlearn/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

transition feature

kwkwvenusgod opened this issue · comments

I tried out to enable transition feature in perceptron learning. After I read the source code, I found the implementation is not consistent to the comments of make_trans_matrix(y, n_classes, dtype=np.float64) in transmatrix.py. Based on my understanding, only relying on the coefficient w and the label count matrix it quite easy to result in some label bias problem, for in real cases based on BIO tagging technique, the label of 'O' will be quite predominant in feature space distribution and label count matrix. So the transition feature make such assumption that the feature distribution of one label's previous one can be consistent and has pattern. As a result the transition feature will resolve some label bias issues. I am not sure my interpretation of transition feature is correct or not. And I also modify corresponding code. If you like I will submit a merge request