Package moa.tasks
Class LearnModel
-
- All Implemented Interfaces:
Configurable
,Serializable
,CapabilitiesHandler
,MOAObject
,OptionHandler
,Task
public class LearnModel extends ClassificationMainTask implements CapabilitiesHandler
Task for learning a model without any evaluation.- Version:
- $Revision: 7 $
- Author:
- Richard Kirkby (rkirkby@cs.waikato.ac.nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description ClassOption
learnerOption
IntOption
maxInstancesOption
IntOption
memCheckFrequencyOption
IntOption
numPassesOption
ClassOption
streamOption
-
Fields inherited from class moa.tasks.ClassificationMainTask
events
-
Fields inherited from class moa.tasks.MainTask
INSTANCES_BETWEEN_MONITOR_UPDATES, outputFileOption
-
Fields inherited from class moa.options.AbstractOptionHandler
config
-
-
Constructor Summary
Constructors Constructor Description LearnModel()
LearnModel(Classifier learner, InstanceStream stream, int maxInstances, int numPasses)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableCapabilities
defineImmutableCapabilities()
Defines the set of capabilities the object has.Object
doMainTask(TaskMonitor monitor, ObjectRepository repository)
This method performs this task.String
getPurposeString()
Dictionary with option texts and objectsClass<?>
getTaskResultType()
Gets the result type of this task.-
Methods inherited from class moa.tasks.ClassificationMainTask
getEventsList, setEventsList
-
Methods inherited from class moa.tasks.MainTask
doTaskImpl
-
Methods inherited from class moa.tasks.AbstractTask
doTask, doTask, getDescription, getTaskName, prepareForUseImpl
-
Methods inherited from class moa.options.AbstractOptionHandler
copy, getCLICreationString, getOptions, getPreparedClassOption, prepareClassOptions, prepareForUse, prepareForUse
-
Methods inherited from class moa.AbstractMOAObject
copy, measureByteSize, measureByteSize, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface moa.capabilities.CapabilitiesHandler
getCapabilities
-
Methods inherited from interface moa.MOAObject
measureByteSize
-
-
-
-
Field Detail
-
learnerOption
public ClassOption learnerOption
-
streamOption
public ClassOption streamOption
-
maxInstancesOption
public IntOption maxInstancesOption
-
numPassesOption
public IntOption numPassesOption
-
memCheckFrequencyOption
public IntOption memCheckFrequencyOption
-
-
Constructor Detail
-
LearnModel
public LearnModel()
-
LearnModel
public LearnModel(Classifier learner, InstanceStream stream, int maxInstances, int numPasses)
-
-
Method Detail
-
getPurposeString
public String getPurposeString()
Description copied from class:AbstractOptionHandler
Dictionary with option texts and objects- Specified by:
getPurposeString
in interfaceOptionHandler
- Overrides:
getPurposeString
in classAbstractOptionHandler
- Returns:
- the string with the purpose of this object
-
getTaskResultType
public Class<?> getTaskResultType()
Description copied from interface:Task
Gets the result type of this task. Tasks can return LearningCurve, LearningEvaluation, Classifier, String, Instances..- Specified by:
getTaskResultType
in interfaceTask
- Returns:
- a class object of the result of this task
-
doMainTask
public Object doMainTask(TaskMonitor monitor, ObjectRepository repository)
Description copied from class:MainTask
This method performs this task.AbstractTask
implementsdoTask
, that usesdoTaskImpl
.MainTask
implementsdoTaskImpl
usingdoMainTask
so its extensions only need to implementdoMainTask
.- Specified by:
doMainTask
in classMainTask
- Parameters:
monitor
- the TaskMonitor to userepository
- the ObjectRepository to use- Returns:
- an object with the result of this task
-
defineImmutableCapabilities
public ImmutableCapabilities defineImmutableCapabilities()
Description copied from interface:CapabilitiesHandler
Defines the set of capabilities the object has. Should be overridden if the object's capabilities do not change.- Specified by:
defineImmutableCapabilities
in interfaceCapabilitiesHandler
- Overrides:
defineImmutableCapabilities
in classClassificationMainTask
- Returns:
- The capabilities of the object.
-
-