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
incorrect number of mistakes in structured perceptron code #25
Comments
I am reopening this because what comes next is related. The number of mistakes is correctly computed, but the code is very confusing. Me, Luis Sarmento and Zita also had trouble figuring this out. In day 3, the code for structured perceptron deals with the initial position at two separate places: first it updates the initial weights, then it processes it in the loop over all positions, where mistakes are counted and transition and emission weights are updated. This led at least four monitors to confusion, so let's make sure each position is processed only in one place. Use one of the following two structures: Process position 0, update initial and emission weights or Process positions 0 ... N (FOR loop) Thanks to Katia and Luis Sarmento for bringing up the issue. |
Not sure I agree the proposed solutions are better. There also basically
The main for loop takes care of the emissions (and counting the mistakes), Perhaps the most clear way is to separate the transition and emission 1) Make emission updates.for i in xrange(N) 2) Make transition updates.... # Initial updates. 2014-07-25 14:43 GMT+01:00 Miguel Almeida notifications@github.com:
|
Fine by me, all three possibilities seem better than the current state. |
not quite sure, but should we not increment the num_mistakes variable at line 56 in the sequences/structured_perceptron.py code by adding the line num_minstakes +=1?
2 minutes later, never mind, I figured it out :). closed.
The text was updated successfully, but these errors were encountered: