private int getPredIndex(String predicate) { return pmap.get(predicate); }
private int getPredIndex(String predicate) { return pmap.get(predicate); }
public double[] eval(String[] context, float[] values,double[] outsums) { int[] scontexts = new int[context.length]; java.util.Arrays.fill(outsums, 0); for (int i=0; i<context.length; i++) { Integer ci = pmap.get(context[i]); scontexts[i] = ci == null ? -1 : ci; } return eval(scontexts,values,outsums,evalParams,true); }
public double[] eval(String[] context, float[] values,double[] outsums) { int[] scontexts = new int[context.length]; java.util.Arrays.fill(outsums, 0); for (int i=0; i<context.length; i++) { Integer ci = pmap.get(context[i]); scontexts[i] = ci == null ? -1 : ci; } return eval(scontexts,values,outsums,evalParams,true); }
int predicateIndex = predicateTable.get(featureName); if (predicateIndex >= 0) { Context context = modelParameters[predicateIndex];
/** * Use this model to evaluate a context and return an array of the likelihood * of each outcome given that context. * * @param context * The names of the predicates which have been observed at the * present decision point. * @param outsums * This is where the distribution is stored. * @return The normalized probabilities for the outcomes given the context. * The indexes of the double[] are the outcome ids, and the actual * string representation of the outcomes can be obtained from the * method getOutcome(int i). */ public final double[] eval(String[] context, float[] values, double[] outsums) { int[] scontexts = new int[context.length]; for (int i = 0; i < context.length; i++) { Integer ci = pmap.get(context[i]); scontexts[i] = ci == null ? -1 : ci; } prior.logPrior(outsums, scontexts, values); return GISModel.eval(scontexts, values, outsums, evalParams); }
/** * Use this model to evaluate a context and return an array of the likelihood * of each outcome given that context. * * @param context * The names of the predicates which have been observed at the * present decision point. * @param outsums * This is where the distribution is stored. * @return The normalized probabilities for the outcomes given the context. * The indexes of the double[] are the outcome ids, and the actual * string representation of the outcomes can be obtained from the * method getOutcome(int i). */ public final double[] eval(String[] context, float[] values, double[] outsums) { int[] scontexts = new int[context.length]; for (int i = 0; i < context.length; i++) { Integer ci = pmap.get(context[i]); scontexts[i] = ci == null ? -1 : ci; } prior.logPrior(outsums, scontexts, values); return GISModel.eval(scontexts, values, outsums, evalParams); }
int pi = pmap.get(feature); if (pi != -1) {
int pi = pmap.get(feature); if (pi != -1) {
pmap.toArray(pmapArray); for (int i = 0; i < this.pmap.size(); i++) { if (i != objModel.pmap.get(pmapArray[i])) return false;
pmap.toArray(pmapArray); for (int i = 0; i < this.pmap.size(); i++) { if (i != objModel.pmap.get(pmapArray[i])) return false;