public abstract class AbstractModel extends Object implements MaxentModel
Modifier and Type | Class and Description |
---|---|
static class |
AbstractModel.ModelType |
Constructor and Description |
---|
AbstractModel(Context[] params,
String[] predLabels,
Map<String,Integer> pmap,
String[] outcomeNames)
Deprecated.
this will be removed in 1.8.1, pmap should be private
|
AbstractModel(Context[] params,
String[] predLabels,
String[] outcomeNames) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getAllOutcomes(double[] ocs)
Return a string matching all the outcome names with all the
probabilities produced by the
eval(String[] context)
method. |
String |
getBestOutcome(double[] ocs)
Return the name of the outcome corresponding to the highest likelihood
in the parameter ocs.
|
Object[] |
getDataStructures()
Provides the fundamental data structures which encode the maxent model
information.
|
int |
getIndex(String outcome)
Gets the index associated with the String name of the given outcome.
|
AbstractModel.ModelType |
getModelType() |
int |
getNumOutcomes()
Returns the number of outcomes for this model.
|
String |
getOutcome(int i)
Return the name of an outcome corresponding to an int id.
|
int |
hashCode() |
getClass, notify, notifyAll, toString, wait, wait, wait
eval, eval, eval
@Deprecated public AbstractModel(Context[] params, String[] predLabels, Map<String,Integer> pmap, String[] outcomeNames)
params
- predLabels
- pmap
- outcomeNames
- public final String getBestOutcome(double[] ocs)
getBestOutcome
in interface MaxentModel
ocs
- A double[] as returned by the eval(String[] context)
method.public AbstractModel.ModelType getModelType()
public final String getAllOutcomes(double[] ocs)
eval(String[] context)
method.getAllOutcomes
in interface MaxentModel
ocs
- A double[]
as returned by the
eval(String[] context)
method.double[] ocs
)
for each one.public final String getOutcome(int i)
getOutcome
in interface MaxentModel
i
- An outcome id.public int getIndex(String outcome)
getIndex
in interface MaxentModel
outcome
- the String name of the outcome for which the
index is desiredpublic int getNumOutcomes()
MaxentModel
getNumOutcomes
in interface MaxentModel
public final Object[] getDataStructures()
Copyright © 2017 The Apache Software Foundation. All rights reserved.