|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MLEngine
This interface is used for wrappers to Machine Learning engines. All classes implementing this interface should have a public constructor that takes no parameters.
Method Summary | |
---|---|
void |
addTrainingInstance(List attributes)
Adds a new training instance to the dataset. |
List |
batchClassifyInstances(List instances)
Like classify instances, but take a list of instances instead of a single instance, and return a list of results (one for each instance) instead of a single result. |
Object |
classifyInstance(List attributes)
Classifies a new instance. |
void |
cleanUp()
Cleans up any resources allocated by the Engine when it is destroyed. |
void |
init()
This method will be called after an engine is created and has its dataset and options set. |
void |
setDatasetDefinition(DatasetDefintion definition)
Sets the definition for the dataset used. |
void |
setOptions(org.jdom.Element options)
Sets the options from an XML JDom element. |
void |
setOwnerPR(ProcessingResource pr)
Registers the PR using the engine with the engine itself. |
Method Detail |
---|
void setOptions(org.jdom.Element options)
options
- the JDom element containing the options from the
configuration.void addTrainingInstance(List attributes) throws ExecutionException
attributes
- the list of attributes describing the instance. The
elements in the list are String values that need to be interpreted
according to the dataset definition: for nominal attributes the values will
used as they are; for numeric attributes the values will be converted to
double.
ExecutionException
void setDatasetDefinition(DatasetDefintion definition)
definition
- Object classifyInstance(List attributes) throws ExecutionException
attributes
- the list of attributes describing the instance. The
elements in the list are Object values that need to be interpreted
according to the dataset definition. The value for the class element will
be arbitrary.
ExecutionException
List batchClassifyInstances(List instances) throws ExecutionException
instances
- A list of lists of attributes describing the instance. The
value for all of the class elements will be arbitrary.
ExecutionException
void init() throws GateException
GateException
void setOwnerPR(ProcessingResource pr)
pr
- the processing resource that owns this engine.void cleanUp()
|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |