|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectadams.core.ConsoleObject
adams.core.option.AbstractOptionHandler
adams.flow.condition.bool.AbstractBooleanCondition
adams.flow.condition.bool.WekaClassification
public class WekaClassification
Uses the index of the classification, i.e., the predicted label, as index of the switch
Valid options are:-D <int> (property: debugLevel) The greater the number the more additional info the scheme may output to the console (0 = off). default: 0 minimum: 0
-model <adams.core.io.PlaceholderFile> (property: modelFile)
The model file to load (when not pointing to a directory).
default: ${CWD}
-model-actor <adams.flow.core.GlobalActorReference> (property: modelActor) The global actor to use for obtaining the model in case serialized model file points to a directory. default:
-on-the-fly (property: onTheFly) If set to true, the model file is not required to be present at set up time (eg if built on the fly), only at execution time.
| Field Summary | |
|---|---|
protected weka.classifiers.Classifier |
m_Model
the model that was loaded from the model file. |
protected GlobalActorReference |
m_ModelActor
the global actor to get the model from. |
protected PlaceholderFile |
m_ModelFile
the serialized model to load. |
protected boolean |
m_OnTheFly
whether the model gets built on the fly and might not be present at the start. |
| Fields inherited from class adams.core.option.AbstractOptionHandler |
|---|
m_DebugLevel, m_OptionManager |
| Constructor Summary | |
|---|---|
WekaClassification()
|
|
| Method Summary | |
|---|---|
Class[] |
accepts()
Returns the class that the consumer accepts. |
void |
defineOptions()
Adds options to the internal list of options. |
protected boolean |
doEvaluate(AbstractActor owner,
Token token)
Evaluates whether to executed the "then" or "else" branch. |
int |
getCaseIndex(AbstractActor owner,
Token token)
Returns the index of the case that should get executed. |
int |
getDefaultCaseIndex(AbstractActor owner,
Token token)
Returns the index of the default case. |
GlobalActorReference |
getModelActor()
Returns the global actor to obtain the model from if model file is pointing to a directory. |
PlaceholderFile |
getModelFile()
Returns the file to load the model from. |
boolean |
getOnTheFly()
Returns whether the model file gets built on the fly and might not be present at start up time. |
String |
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI. |
String |
globalInfo()
Returns a string describing the object. |
String |
modelActorTipText()
Returns the tip text for this property. |
String |
modelFileTipText()
Returns the tip text for this property. |
String |
onTheFlyTipText()
Returns the tip text for this property. |
void |
setModelActor(GlobalActorReference value)
Sets the global actor to obtain the model from if model file is pointing to a directory. |
void |
setModelFile(PlaceholderFile value)
Sets the file to load the model from. |
void |
setOnTheFly(boolean value)
Sets whether the model file gets built on the fly and might not be present at start up time. |
String |
setUp(AbstractActor owner)
Initializes the item for flow execution. |
protected String |
setUpModel(AbstractActor owner)
Loads the model from the model file. |
| Methods inherited from class adams.flow.condition.bool.AbstractBooleanCondition |
|---|
evaluate, preEvaluate, shallowCopy, shallowCopy |
| Methods inherited from class adams.core.option.AbstractOptionHandler |
|---|
cleanUpOptions, debug, debug, debugLevelTipText, destroy, finishInit, getDebugLevel, getOptionManager, initialize, isDebugOn, newOptionManager, reset, setDebugLevel, toCommandLine, toString |
| Methods inherited from class adams.core.ConsoleObject |
|---|
getDebugging, getSystemErr, getSystemOut, sizeOf |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface adams.flow.condition.bool.BooleanCondition |
|---|
evaluate, shallowCopy, shallowCopy |
| Field Detail |
|---|
protected PlaceholderFile m_ModelFile
protected GlobalActorReference m_ModelActor
protected weka.classifiers.Classifier m_Model
protected boolean m_OnTheFly
| Constructor Detail |
|---|
public WekaClassification()
| Method Detail |
|---|
public String globalInfo()
globalInfo in class AbstractOptionHandlerpublic void defineOptions()
defineOptions in interface OptionHandlerdefineOptions in class AbstractOptionHandlerpublic void setModelFile(PlaceholderFile value)
value - the model filepublic PlaceholderFile getModelFile()
public String modelFileTipText()
public void setModelActor(GlobalActorReference value)
value - the actor referencepublic GlobalActorReference getModelActor()
public String modelActorTipText()
public void setOnTheFly(boolean value)
value - if true then the model does not have to be present at
start up timepublic boolean getOnTheFly()
public String onTheFlyTipText()
public String getQuickInfo()
getQuickInfo in interface BooleanConditiongetQuickInfo in class AbstractBooleanConditionpublic Class[] accepts()
accepts in interface BooleanConditionaccepts in class AbstractBooleanConditionprotected String setUpModel(AbstractActor owner)
owner - the actor this condition belongs to
public String setUp(AbstractActor owner)
setUp in interface BooleanConditionsetUp in class AbstractBooleanConditionowner - the actor this condition belongs to
protected boolean doEvaluate(AbstractActor owner,
Token token)
doEvaluate in class AbstractBooleanConditionowner - the owning IfThenElse actortoken - the current token passing through the IfThenElse actor
public int getCaseIndex(AbstractActor owner,
Token token)
getCaseIndex in interface IndexedBooleanConditionowner - the owning actortoken - the current token passing through the actor
public int getDefaultCaseIndex(AbstractActor owner,
Token token)
getDefaultCaseIndex in interface IndexedBooleanConditionowner - the owning actortoken - the current token passing through the actor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||