Closed uduse closed 5 years ago
Ok, I figured this out by reading the source code. The first column is the original label, the others are probability prediction of all labels. The test set is shuffled before it is tested, so the order of result doesn't match the order of the input.
Hi! I think according to https://github.com/zhiguowang/BiMPM/blob/7052c19acb83452ad077da14512bcac19a00c3d0/src/SentenceMatchTrainer.py#L175-L183 , the text and dev datastreams are not shuffled. Could you point out where the shuffling takes place? Thanks!
@wanghm92 SentenceMatchDataStream sorts input if the isSort
flag is set, and for all I know isSort
is always checked wherever SentenceMatchDataStream is used.
This sorts the inputs based on their length for a purpose that I am not aware of. Maybe to utilize cache (inputs with the same length are alike), maybe.
Oh, I overlooked the isSort
flag. Thanks!
Yes, sorting helps to group sentences with similar length into the same bucket to avoid unnecessary padding after short sentences to the length of a very long one.
I guess sorting as a preprocess step + turning off the isSort
flag for dev and test would be a nice way to preserve the order of testing instances.
@wanghm92 grouping similar sentences into the same bucket/batch sounds more reasonable than my cache thing.
The sorting sorts attributes all together, so info like the original sentences has the same order as well. What I did is to print out the entire thing (in additional to just probs) after the evaluation is done, and retrieve the original order by other fields.
Closed due to inactivity.
My guess is that, the first column is the predicted label, the second column is label
1
with its probability, and third column is label0
with its probability. However, if it's this way, then the first column should contain the label whichever has a larger probability in the second and the third column. It is not. The last line0 1:0.691392481327 0:0.30860760808
contradicts my guess.So how should I interpret this?