public interface MaxentModel
Modifier and Type | Method and Description |
---|---|
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.
|
String |
getAllOutcomes(double[] outcomes)
Return a string matching all the outcome names with all the
probabilities produced by the
eval(String[]
context) method. |
String |
getBestOutcome(double[] outcomes)
Simple function to return the outcome associated with the index
containing the highest probability in the double[].
|
int |
getIndex(String outcome)
Gets the index associated with the String name of the given
outcome.
|
int |
getNumOutcomes()
Returns the number of outcomes for this model.
|
String |
getOutcome(int i)
Gets the String name of the outcome associated with the index
i.
|
double[] eval(String[] context)
context
- A list of String names of the contextual predicates
which are to be evaluated together.double[] eval(String[] context, double[] probs)
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.double[] eval(String[] context, float[] values)
context
- A list of String names of the contextual predicates
which are to be evaluated together.values
- The values associated with each context.String getBestOutcome(double[] outcomes)
outcomes
- A double[]
as returned by the
eval(String[] context)
method.String getAllOutcomes(double[] outcomes)
eval(String[]
context)
method.outcomes
- A double[]
as returned by the
eval(String[] context)
method.double[] ocs
)
for each one.String getOutcome(int i)
i
- the index for which the name of the associated outcome is
desired.int getIndex(String outcome)
outcome
- the String name of the outcome for which the
index is desiredint getNumOutcomes()
Copyright © 2017 The Apache Software Foundation. All rights reserved.