Indexing
Due to the special case of '0' indicating no label and being assigned uniform probs, and M being the number of labels not including this I believe the original function was not correct, as the highest label would be out of bounds, and the first label mapped to row 1 of the unary matrix. The above minor change should fix this, ergo label 1 corresponds to row 1, the number of rows is equal to M, labels go from 1 to M.
Showing
Please register or sign in to comment