public class QNModel extends AbstractModel
AbstractModel.ModelType
Constructor and Description |
---|
QNModel(Context[] params,
java.lang.String[] predLabels,
java.lang.String[] outcomeNames) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
static double[] |
eval(int[] context,
float[] values,
double[] probs,
int nOutcomes,
int nPredLabels,
double[] parameters)
Model evaluation which should be used during training to report model accuracy.
|
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.
|
int |
getNumOutcomes()
Returns the number of outcomes for this model.
|
getAllOutcomes, getBestOutcome, getDataStructures, getIndex, getModelType, getOutcome
public QNModel(Context[] params, java.lang.String[] predLabels, java.lang.String[] outcomeNames)
public int getNumOutcomes()
MaxentModel
getNumOutcomes
in interface MaxentModel
getNumOutcomes
in class AbstractModel
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, 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)
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 static double[] eval(int[] context, float[] values, double[] probs, int nOutcomes, int nPredLabels, double[] parameters)
context
- Indices of the predicates which have been observed at the present
decision point.values
- Weights of the predicates which have been observed at
the present decision point.probs
- Probability for outcomesnOutcomes
- Number of outcomesnPredLabels
- Number of unique predicatesparameters
- Model parameterspublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2010 - 2020 Adobe. All Rights Reserved