In #26 we are using a train and test corpus. There are features generated on the test corpus for which the model hasn't trained any weights (since they are unobserved during training). MPGraph should ignore these features in the score function of its Factors. A quick fix might be
result =
if (index >= fg.weights.size) 0
else singleton(index) * fg.weights(index)
In #26 we are using a train and test corpus. There are features generated on the test corpus for which the model hasn't trained any weights (since they are unobserved during training). MPGraph should ignore these features in the
score
function of itsFactor
s. A quick fix might be