public class PerceptronModel extends AbstractModel
AbstractModel.ModelType
Constructor and Description |
---|
PerceptronModel(Context[] params,
java.lang.String[] predLabels,
IndexHashTable<java.lang.String> pmap,
java.lang.String[] outcomeNames) |
PerceptronModel(Context[] params,
java.lang.String[] predLabels,
java.util.Map<java.lang.String,java.lang.Integer> pmap,
java.lang.String[] outcomeNames)
Deprecated.
use the constructor with the
IndexHashTable instead! |
PerceptronModel(Context[] params,
java.lang.String[] predLabels,
java.lang.String[] outcomeNames) |
Modifier and Type | Method and Description |
---|---|
static double[] |
eval(int[] context,
double[] prior,
EvalParameters model) |
static double[] |
eval(int[] context,
float[] values,
double[] prior,
EvalParameters model,
boolean normalize) |
double[] |
eval(java.lang.String[] context)
Evaluates a context.
|
double[] |
eval(java.lang.String[] context,
double[] probs)
Evaluates a context.
|
double[] |
eval(java.lang.String[] context,
float[] values)
Evaluates a contexts with the specified context values.
|
double[] |
eval(java.lang.String[] context,
float[] values,
double[] outsums) |
static void |
main(java.lang.String[] args) |
getAllOutcomes, getBestOutcome, getDataStructures, getIndex, getModelType, getNumOutcomes, getOutcome
public PerceptronModel(Context[] params, java.lang.String[] predLabels, IndexHashTable<java.lang.String> pmap, java.lang.String[] outcomeNames)
@Deprecated public PerceptronModel(Context[] params, java.lang.String[] predLabels, java.util.Map<java.lang.String,java.lang.Integer> pmap, java.lang.String[] outcomeNames)
IndexHashTable
instead!public PerceptronModel(Context[] params, java.lang.String[] predLabels, java.lang.String[] outcomeNames)
public double[] eval(java.lang.String[] context)
MaxentModel
context
- A list of String names of the contextual predicates
which are to be evaluated together.public double[] eval(java.lang.String[] context, float[] values)
MaxentModel
context
- A list of String names of the contextual predicates
which are to be evaluated together.values
- The values associated with each context.public double[] eval(java.lang.String[] context, double[] probs)
MaxentModel
context
- A list of String names of the contextual predicates
which are to be evaluated together.probs
- An array which is populated with the probabilities for each of the different
outcomes, all of which sum to 1.public double[] eval(java.lang.String[] context, float[] values, double[] outsums)
public static double[] eval(int[] context, double[] prior, EvalParameters model)
public static double[] eval(int[] context, float[] values, double[] prior, EvalParameters model, boolean normalize)
public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException
Copyright © 2010 - 2020 Adobe. All Rights Reserved