for (int row = 0; row < numDistinctClasses; row++) {
// we can quite efficiently iterate over the non-zero row vectors now
DoubleVector rowVector = probabilityMatrix.getRowVector(row);
// don't care about not occuring words, we honor them with a very small
// probability later on when predicting, here we save a lot space.
Iterator<DoubleVectorElement> iterateNonZero = rowVector.iterateNonZero();
double normalizer = FastMath.log(tokenPerClass[row]
+ probabilityMatrix.getColumnCount() - 1);
while (iterateNonZero.hasNext()) {
DoubleVectorElement next = iterateNonZero.next();
double currentWordCount = next.getValue();