int numFeatures = dict.size() + 1;
int numLabels = labelDict.size();
// Include the feature weights according to each label
RankedFeatureVector rfv;
double[] weights = new double[numFeatures-1]; // do not deal with the default feature
for (int li = 0; li < numLabels; li++) {
out.print ("FEATURES FOR CLASS "+labelDict.lookupObject (li) + " ");
for (int i = 0; i < defaultFeatureIndex; i++) {
Object name = dict.lookupObject (i);
double weight = parameters [li*numFeatures + i];
weights[i] = weight;
}
rfv = new RankedFeatureVector(dict,weights);
rfv.printTopK(out,num);
out.print (" <default> "+parameters [li*numFeatures + defaultFeatureIndex] + " ");
rfv.printLowerK(out, num);
out.println();
}
}