/** * Provides the fundamental data structures which encode the maxent model * information. This method will usually only be needed by * GISModelWriters. The following values are held in the Object array * which is returned by this method: * * <li>index 0: opennlp.maxent.Context[] containing the model * parameters * <li>index 1: java.util.Map containing the mapping of model predicates * to unique integers * <li>index 2: java.lang.String[] containing the names of the outcomes, * stored in the index of the array which represents their * unique ids in the model. * <li>index 3: java.lang.Integer containing the value of the models * correction constant * <li>index 4: java.lang.Double containing the value of the models * correction parameter * * @return An Object[] with the values as described above. */ public final Object[] getDataStructures() { Object[] data = new Object[5]; data[0] = evalParams.getParams(); data[1] = pmap; data[2] = outcomeNames; data[3] = (int) evalParams.getCorrectionConstant(); data[4] = evalParams.getCorrectionParam(); return data; } }
/** * Provides the fundamental data structures which encode the maxent model * information. This method will usually only be needed by * GISModelWriters. The following values are held in the Object array * which is returned by this method: * * <li>index 0: opennlp.maxent.Context[] containing the model * parameters * <li>index 1: java.util.Map containing the mapping of model predicates * to unique integers * <li>index 2: java.lang.String[] containing the names of the outcomes, * stored in the index of the array which represents their * unique ids in the model. * <li>index 3: java.lang.Integer containing the value of the models * correction constant * <li>index 4: java.lang.Double containing the value of the models * correction parameter * * @return An Object[] with the values as described above. */ public final Object[] getDataStructures() { Object[] data = new Object[5]; data[0] = evalParams.getParams(); data[1] = pmap; data[2] = outcomeNames; data[3] = (int) evalParams.getCorrectionConstant(); data[4] = evalParams.getCorrectionParam(); return data; } }
if (model.getCorrectionParam() != 0) { prior[oid] = Math .exp(prior[oid] .getCorrectionConstant())) * model.getCorrectionParam())); } else { prior[oid] = Math.exp(prior[oid] * model.getConstantInverse());
if (model.getCorrectionParam() != 0) { prior[oid] = Math .exp(prior[oid] .getCorrectionConstant())) * model.getCorrectionParam())); } else { prior[oid] = Math.exp(prior[oid] * model.getConstantInverse());
return new GISModel(params, featNames, labels, 1, evalParams.getCorrectionParam());
return new GISModel(params, predLabels, outcomeLabels, 1, evalParams.getCorrectionParam());
return new GISModel(params, predLabels, outcomeLabels, 1, evalParams.getCorrectionParam());
return new GISModel(params, predLabels, outcomeLabels, 1, evalParams.getCorrectionParam());