if (li == -1) // hack to avoid invalid instances
continue;
assert (li >=0 && li < fvs.size());
this.theClassifier.getClassificationScores (instance, scores);
} else if (target instanceof Labels){
Labels labels = (Labels)target;
int[] bestPositions = new int[labels.size()];
for (int pi = 0; pi < labels.size(); pi++)
bestPositions[pi] = Integer.valueOf(labels.get(pi).toString());
li = bestPositions[0];
this.theClassifier.getClassificationScoresForTies (instance, scores, bestPositions);
}
value = - (instanceWeight * Math.log (scores[li]));
if(Double.isNaN(value)) {