public final double[] eval(String[] context, double[] outsums) { return eval(context, null, outsums); }
/** * Use this model to evaluate a context and return an array of the likelihood * of each outcome given the specified context and the specified parameters. * * @param context * The integer values of the predicates which have been observed at * the present decision point. * @param prior * The prior distribution for the specified context. * @param model * The set of parametes used in this computation. * @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 static double[] eval(int[] context, double[] prior, EvalParameters model) { return eval(context, null, prior, model); }
public final double[] eval(String[] context, float[] values) { return (eval(context, values, new double[evalParams.getNumOutcomes()])); }
/** * 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. * @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) { return (eval(context, new double[evalParams.getNumOutcomes()])); }
/** * Use this model to evaluate a context and return an array of the likelihood * of each outcome given the specified context and the specified parameters. * * @param context * The integer values of the predicates which have been observed at * the present decision point. * @param values * The values for each of the parameters. * @param prior * The prior distribution for the specified context. * @param model * The set of parametes used in this computation. * @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). */ static double[] eval(int[] context, float[] values, double[] prior, EvalParameters model) { Context[] scontexts = new Context[context.length]; for (int i = 0; i < context.length; i++) { scontexts[i] = model.getParams()[context[i]]; } return GISModel.eval(scontexts, values, prior, model); }
/** * 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) { Context[] scontexts = new Context[context.length]; for (int i = 0; i < context.length; i++) { scontexts[i] = pmap.get(context[i]); } prior.logPrior(outsums, scontexts, values); return GISModel.eval(scontexts, values, outsums, evalParams); }
public final double[] eval(String[] context, double[] outsums) { return eval(context, null, outsums); }
public final double[] eval(String[] context, double[] outsums) { return eval(context, null, outsums); }
double[] realResults = realModel.eval(features2Classify); double[] repeatResults = repeatModel.eval(features2Classify); realResults = realModel.eval(features2Classify, new float[] {5.5f, 6.1f, 9.1f, 4.0f, 1.8f}); repeatResults = repeatModel.eval(features2Classify, new float[] {5.5f, 6.1f, 9.1f, 4.0f, 1.8f});
/** * Use this model to evaluate a context and return an array of the likelihood * of each outcome given the specified context and the specified parameters. * * @param context * The integer values of the predicates which have been observed at * the present decision point. * @param prior * The prior distribution for the specified context. * @param model * The set of parametes used in this computation. * @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 static double[] eval(int[] context, double[] prior, EvalParameters model) { return eval(context, null, prior, model); }
/** * Use this model to evaluate a context and return an array of the likelihood * of each outcome given the specified context and the specified parameters. * * @param context * The integer values of the predicates which have been observed at * the present decision point. * @param prior * The prior distribution for the specified context. * @param model * The set of parametes used in this computation. * @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 static double[] eval(int[] context, double[] prior, EvalParameters model) { return eval(context, null, prior, model); }
public final double[] eval(String[] context, float[] values) { return (eval(context, values, new double[evalParams.getNumOutcomes()])); }
/** * 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. * @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) { return (eval(context, new double[evalParams.getNumOutcomes()])); }
public final double[] eval(String[] context, float[] values) { return (eval(context, values, new double[evalParams.getNumOutcomes()])); }
/** * 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. * @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) { return (eval(context, new double[evalParams.getNumOutcomes()])); }
/** * 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) { Context[] scontexts = new Context[context.length]; for (int i = 0; i < context.length; i++) { scontexts[i] = pmap.get(context[i]); } 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 the specified context and the specified parameters. * * @param context * The integer values of the predicates which have been observed at * the present decision point. * @param values * The values for each of the parameters. * @param prior * The prior distribution for the specified context. * @param model * The set of parametes used in this computation. * @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). */ static double[] eval(int[] context, float[] values, double[] prior, EvalParameters model) { Context[] scontexts = new Context[context.length]; for (int i = 0; i < context.length; i++) { scontexts[i] = model.getParams()[context[i]]; } return GISModel.eval(scontexts, values, prior, model); }
/** * Use this model to evaluate a context and return an array of the likelihood * of each outcome given the specified context and the specified parameters. * * @param context * The integer values of the predicates which have been observed at * the present decision point. * @param values * The values for each of the parameters. * @param prior * The prior distribution for the specified context. * @param model * The set of parametes used in this computation. * @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). */ static double[] eval(int[] context, float[] values, double[] prior, EvalParameters model) { Context[] scontexts = new Context[context.length]; for (int i = 0; i < context.length; i++) { scontexts[i] = model.getParams()[context[i]]; } return GISModel.eval(scontexts, values, prior, model); }
/** * 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) { Context[] scontexts = new Context[context.length]; for (int i = 0; i < context.length; i++) { scontexts[i] = pmap.get(context[i]); } prior.logPrior(outsums, scontexts, values); return GISModel.eval(scontexts, values, outsums, evalParams); }