|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MaxentModel
Interface for maximum entropy models.
Method Summary | |
---|---|
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. |
java.lang.String |
getAllOutcomes(double[] outcomes)
Return a string matching all the outcome names with all the probabilities produced by the eval(String[]
context) method. |
java.lang.String |
getBestOutcome(double[] outcomes)
Simple function to return the outcome associated with the index containing the highest probability in the double[]. |
java.lang.Object[] |
getDataStructures()
Returns the data structures relevant to storing the model. |
int |
getIndex(java.lang.String outcome)
Gets the index associated with the String name of the given outcome. |
int |
getNumOutcomes()
Returns the number of outcomes for this model. |
java.lang.String |
getOutcome(int i)
Gets the String name of the outcome associated with the index i. |
Method Detail |
---|
double[] eval(java.lang.String[] context)
context
- A list of String names of the contextual predicates
which are to be evaluated together.
double[] eval(java.lang.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(java.lang.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.
java.lang.String getBestOutcome(double[] outcomes)
outcomes
- A double[]
as returned by the
eval(String[] context)
method.
java.lang.String getAllOutcomes(double[] outcomes)
eval(String[]
context)
method.
outcomes
- A double[]
as returned by the
eval(String[] context)
method.
double[] ocs
)
for each one.java.lang.String getOutcome(int i)
i
- the index for which the name of the associated outcome is
desired.
int getIndex(java.lang.String outcome)
outcome
- the String name of the outcome for which the
index is desired
java.lang.Object[] getDataStructures()
int getNumOutcomes()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |