Skip to content

ACRF-example-fixes#24

Open
steveash wants to merge 3 commits intomimno:masterfrom
steveash:ACRF-example-fixes
Open

ACRF-example-fixes#24
steveash wants to merge 3 commits intomimno:masterfrom
steveash:ACRF-example-fixes

Conversation

@steveash
Copy link

Bugfix for ACRF when there is only one timeslice; also fix a few errors in the example code

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be looping over maxTime -- not over size()

@casutton
Copy link
Collaborator

casutton commented Mar 2, 2015

Thanks! I'd be keen in merge in the change to CrossTemplate1.java, but I'm not so sure about the change to ACRF.java. The issue is that much of the time BigramTemplate is used in conjunction with UnigramTemplate for statistical reasons, because the unigram features provide a form of backoff to the bigram features. (This is probably why I hadn't noticed this issue earlier.)

But if you use this version of BigramTemplate along with UnigramTemplate, then for instances with only one time slice, you would get two redundant unigram factors with different parameters. This behaviour could be confusing and maybe even lead to the model overfitting.

Maybe the cleanest way to handle this is to create a template whose job is to put a unary factor only on the first labels vector in the sequence. This would fix the corner case, and also would be generally useful, as even if you are using Bigrams and Unigrams, having this behaviour is useful. Would be good to have this in a separate template so that it can be plugged in different ways. Would you have time to modify the patch accordingly?

@casutton casutton self-assigned this Mar 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants