code: public void eval(int[] context, double[] outsums) {
      for (int oid = 0; oid < numOutcomes; oid++) {
        outsums[oid] = iprob;
        numfeats[oid] = 0;
      }
      int[] activeOutcomes;
      double[] activeParameters; 
      for (int i = 0; i < context.length; i++) {
        Context predParams = params[context[i]];
        activeOutcomes = predParams.getOutcomes();
        activeParameters = predParams.getParameters();
        for (int j = 0; j < activeOutcomes.length; j++) {
          int oid = activeOutcomes[j];
          numfeats[oid]++;
          outsums[oid] += constantInverse * activeParameters[j];
        }
      }
  
      double SUM = 0.0;
      for (int oid = 0; oid < numOutcomes; oid++) {
        outsums[oid] = Math.exp(outsums[oid]);
        if (_useSlackParameter) {
          outsums[oid] += ((1.0 - ((double) numfeats[oid] / constant)) * correctionParam);
        }
        SUM += outsums[oid];
      }
  
      for (int oid = 0; oid < numOutcomes; oid++)
        outsums[oid] /= SUM;
  
    }
docs: Use this model to evaluate a context and populate the specified outsums array with the
  likelihood of each outcome given that context.
  
  @param context The integers of the predicates which have been
  observed at the present decision point.