SimpleMatrix predictions = RNNCoreAnnotations.getPredictions(tree);
SimpleMatrix deltaClass = predictions.minus(goldLabel);
</BUG>
SimpleMatrix localCD = deltaClass.mult(RNNUtils.concatenateWithBias(currentVector).transpose());
<BUG>double error = -(RNNUtils.elementwiseApplyLog(predictions).elementMult(goldLabel).elementSum());
RNNCoreAnnotations.setPredictionError(tree, error);</BUG>
if (tree.isPreTerminal()) { // below us is a word vector
unaryCD.put(category, unaryCD.get(category).plus(localCD));
String word = tree.children()[0].label().value();
word = model.getVocabWord(word);

SimpleMatrix predictions = RNNCoreAnnotations.getPredictions(tree);
SimpleMatrix deltaClass = predictions.minus(goldLabel).scale(nodeWeight);
SimpleMatrix localCD = deltaClass.mult(RNNUtils.concatenateWithBias(currentVector).transpose());
double error = -(RNNUtils.elementwiseApplyLog(predictions).elementMult(goldLabel).elementSum());
error = error * nodeWeight;
RNNCoreAnnotations.setPredictionError(tree, error);
if (tree.isPreTerminal()) { // below us is a word vector
unaryCD.put(category, unaryCD.get(category).plus(localCD));
String word = tree.children()[0].label().value();
word = model.getVocabWord(word);
