Dirichlet.digamma(sumScores + totalLength) -
Dirichlet.digamma(sumScores);
for (int loc = 0; loc < features.numLocations(); loc++) {
int index = features.indexAtLocation(loc);
double value = features.valueAtLocation(loc);
if (value == 0.0) { continue; }
// In a FeatureVector, there's no easy way to say "do you know
// about this id?" so I've broken this into two for loops,