Does this mean that you only use the target category predictions for computing the confidence?  I'm not sure what's the correct thing to do, but i'm computing the confidence using all predictions in this case (using the plurality formula), to take into account the negatives too (it sounded better to me).  In the negative case, since we then perform an individual plurality vote using the `restOfPredictions`, i only use them to compute the confidence (as you, i think, do).