public class QNModel extends AbstractModel
AbstractModel.ModelType
evalParams, modelType, outcomeNames, pmap, prior
Constructor and Description |
---|
QNModel(LogLikelihoodFunction monitor,
double[] parameters) |
QNModel(String[] predNames,
String[] outcomeNames,
Context[] params,
double[] parameters) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
double[] |
eval(String[] context)
Evaluates a context.
|
double[] |
eval(String[] context,
double[] probs)
Evaluates a context.
|
double[] |
eval(String[] context,
float[] values)
Evaluates a contexts with the specified context values.
|
int |
getNumOutcomes()
Returns the number of outcomes for this model.
|
double[] |
getParameters() |
getAllOutcomes, getBestOutcome, getDataStructures, getIndex, getModelType, getOutcome
public QNModel(LogLikelihoodFunction monitor, double[] parameters)
public double[] eval(String[] context)
MaxentModel
context
- A list of String names of the contextual predicates
which are to be evaluated together.public double[] eval(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(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 int getNumOutcomes()
MaxentModel
getNumOutcomes
in interface MaxentModel
getNumOutcomes
in class AbstractModel
public double[] getParameters()
Copyright © 2017 The Apache Software Foundation. All rights reserved.