|
||||||||||
| 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.core.AbstractActor
adams.flow.transformer.AbstractTransformer
adams.flow.transformer.WekaClassifierRanker
public class WekaClassifierRanker
Performs a quick evaluation using cross-validation on a single dataset (or evaluation on a separate test set if the number of folds is less than 2) to rank the classifiers received on the input and forwarding the x best ones. Further evaluation can be performed using the Experimenter.
Input/output:-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
-name <java.lang.String> (property: name) The name of the actor. default: WekaClassifierRanker
-annotation <adams.core.base.BaseText> (property: annotations) The annotations to attach to this actor. default:
-skip (property: skip) If set to true, transformation is skipped and the input token is just forwarded as it is.
-stop-flow-on-error (property: stopFlowOnError) If set to true, the flow gets stopped in case this actor encounters an error; useful for critical actors.
-max <int> (property: max) The maximum number of top-ranked classifiers to forward; use -1 to forward all of them (ranked array). default: 3 minimum: -1
-seed <long> (property: seed) The seed value to use in the cross-validation. default: 1
-folds <int> (property: folds) The number of folds to use in cross-validation. default: 10 minimum: 1
-measure <Correlation coefficient|Root mean squared error|Root relative squared error|Mean absolute error|Root absolute error|Combined: (1-abs(CC)) + RRSE + RAE|Accuracy|Kapp> (property: measure) The measure used for ranking the classifiers. default: CC
-train <adams.flow.core.GlobalActorReference> (property: train) The name of the global actor that is used for obtaining the training set. default: train
-test <adams.flow.core.GlobalActorReference> (property: test) The name of the global actor that is used for obtaining the test set (only if folds <2). default: test
-output-best (property: outputBestSetup) If true, then for optimizers like GridSearch and MultiSearch the best setup that was found will be output instead of the optimizer setup.
-num-threads <int> (property: numThreads) The number of threads to use for evaluating the classifiers in parallel (-1 means one for each core/cpu). default: -1 minimum: -1
| Nested Class Summary | |
|---|---|
static class |
WekaClassifierRanker.Measure
The performance measure to use. |
static class |
WekaClassifierRanker.RankingJob
A job class specific to ranking classifiers. |
| Field Summary | |
|---|---|
protected int |
m_Folds
the number of folds to use in cross-validation. |
protected GlobalActorHelper |
m_Helper
the helper class. |
protected JobRunner<WekaClassifierRanker.RankingJob> |
m_JobRunner
the job runner for evaluating the setups. |
protected int |
m_Max
the maximum number of top-ranked classifiers to forward. |
protected WekaClassifierRanker.Measure |
m_Measure
the measure for the evaluation. |
protected int |
m_NumThreads
the number of threads to use for parallel execution. |
protected boolean |
m_OutputBestSetup
whether to output the best setup in case of GridSearch/MultiSearch. |
protected long |
m_Seed
the random seed to use. |
protected GlobalActorReference |
m_Test
the global actor to obtain the test dataset for train/test evaluation from. |
protected GlobalActorReference |
m_Train
the global actor to obtain the training dataset from. |
| Fields inherited from class adams.flow.transformer.AbstractTransformer |
|---|
BACKUP_INPUT, BACKUP_OUTPUT, m_InputToken, m_OutputToken |
| Fields inherited from class adams.flow.core.AbstractActor |
|---|
FILE_EXTENSION, FILE_EXTENSION_GZ, m_Annotations, m_BackupState, m_DetectedObjectVariables, m_DetectedVariables, m_ErrorHandler, m_Executed, m_FullName, m_Headless, m_Name, m_Parent, m_Root, m_Self, m_Skip, m_StopFlowOnError, m_StopMessage, m_Stopped, m_StorageHandler, m_VariablesUpdated |
| Fields inherited from class adams.core.option.AbstractOptionHandler |
|---|
m_DebugLevel, m_OptionManager |
| Constructor Summary | |
|---|---|
WekaClassifierRanker()
|
|
| Method Summary | |
|---|---|
Class[] |
accepts()
Returns the class that the consumer accepts. |
void |
cleanUp()
Frees up memory in a "destructive" non-reversible way. |
void |
defineOptions()
Adds options to the internal list of options. |
protected String |
doExecute()
Executes the flow item. |
void |
flowPauseStateChanged(FlowPauseStateEvent e)
Gets called when the pause state of the flow changes. |
String |
foldsTipText()
Returns the tip text for this property. |
Class[] |
generates()
Returns the class of objects that it generates. |
int |
getFolds()
Returns the number of folds to use. |
int |
getMax()
Returns the maximum number of top-ranked classifiers to forward. |
WekaClassifierRanker.Measure |
getMeasure()
Returns the measure used for ranking the classifiers. |
int |
getNumThreads()
Returns the number of threads in use. |
boolean |
getOutputBestSetup()
Returns whether to output the best setup for optimizers like GridSearch and MultiSearch. |
String |
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI. |
long |
getSeed()
Returns the seed value. |
GlobalActorReference |
getTest()
Returns the name of the global actor to obtain the test set. |
GlobalActorReference |
getTrain()
Returns the name of the global actor to obtain the training set. |
String |
globalInfo()
Returns a string describing the object. |
protected void |
initialize()
Initializes the members. |
boolean |
isPaused()
Returns whether the object is currently paused. |
String |
maxTipText()
Returns the tip text for this property. |
String |
measureTipText()
Returns the tip text for this property. |
String |
numThreadsTipText()
Returns the tip text for this property. |
String |
outputBestSetupTipText()
Returns the tip text for this property. |
void |
pauseExecution()
Pauses the execution. |
void |
resumeExecution()
Resumes the execution. |
String |
seedTipText()
Returns the tip text for this property. |
void |
setFolds(int value)
Sets the number of folds to use. |
void |
setMax(int value)
Sets the maximum number of top-ranked classifiers to forward. |
void |
setMeasure(WekaClassifierRanker.Measure value)
Sets the measure to use for ranking the classifiers. |
void |
setNumThreads(int value)
Sets the number of threads to use. |
void |
setOutputBestSetup(boolean value)
Sets whether to output the best setup found for optimizers like GridSearch and MultiSearch. |
void |
setSeed(long value)
Sets the seed value. |
void |
setTest(GlobalActorReference value)
Sets the name of the global actor to obtain the test set. |
void |
setTrain(GlobalActorReference value)
Sets the name of the global actor to obtain the training set. |
String |
setUp()
Initializes the item for flow execution. |
void |
stopExecution()
Stops the execution. |
String |
testTipText()
Returns the tip text for this property. |
String |
trainTipText()
Returns the tip text for this property. |
| Methods inherited from class adams.flow.transformer.AbstractTransformer |
|---|
backupState, execute, hasPendingOutput, input, output, postExecute, reset, restoreState, wrapUp |
| Methods inherited from class adams.core.option.AbstractOptionHandler |
|---|
cleanUpOptions, debug, debugLevelTipText, finishInit, getDebugLevel, getOptionManager, isDebugOn, newOptionManager, setDebugLevel, toCommandLine, toString |
| Methods inherited from class adams.core.ConsoleObject |
|---|
getDebugging, getSystemErr, getSystemOut |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected GlobalActorReference m_Train
protected GlobalActorReference m_Test
protected int m_Max
protected long m_Seed
protected int m_Folds
protected WekaClassifierRanker.Measure m_Measure
protected boolean m_OutputBestSetup
protected int m_NumThreads
protected GlobalActorHelper m_Helper
protected JobRunner<WekaClassifierRanker.RankingJob> m_JobRunner
| Constructor Detail |
|---|
public WekaClassifierRanker()
| Method Detail |
|---|
public String globalInfo()
globalInfo in class AbstractOptionHandlerpublic void defineOptions()
defineOptions in interface OptionHandlerdefineOptions in class AbstractActorprotected void initialize()
initialize in class AbstractActorpublic String getQuickInfo()
getQuickInfo in interface QuickInfoSupportergetQuickInfo in class AbstractActorpublic void setMax(int value)
value - the maximum number, use -1 for allpublic int getMax()
public String maxTipText()
public void setSeed(long value)
setSeed in interface Randomizablevalue - the seedpublic long getSeed()
getSeed in interface Randomizablepublic String seedTipText()
seedTipText in interface Randomizablepublic void setFolds(int value)
value - the foldspublic int getFolds()
public String foldsTipText()
public void setMeasure(WekaClassifierRanker.Measure value)
value - the ranking measurepublic WekaClassifierRanker.Measure getMeasure()
public String measureTipText()
public void setTrain(GlobalActorReference value)
value - the name of the global actorpublic GlobalActorReference getTrain()
public String trainTipText()
public void setTest(GlobalActorReference value)
value - the name of the global actorpublic GlobalActorReference getTest()
public String testTipText()
public void setOutputBestSetup(boolean value)
value - true if the best setup is to be outputpublic boolean getOutputBestSetup()
public String outputBestSetupTipText()
public void setNumThreads(int value)
value - the number of threadspublic int getNumThreads()
public String numThreadsTipText()
public String setUp()
setUp in class AbstractActorpublic Class[] accepts()
accepts in interface InputConsumerpublic Class[] generates()
generates in interface OutputProducerprotected String doExecute()
doExecute in class AbstractActorpublic void flowPauseStateChanged(FlowPauseStateEvent e)
flowPauseStateChanged in interface FlowPauseStateListenere - the eventpublic void pauseExecution()
pauseExecution in interface Pausablepublic boolean isPaused()
isPaused in interface Pausablepublic void resumeExecution()
resumeExecution in interface Pausablepublic void stopExecution()
stopExecution in interface StoppablestopExecution in class AbstractActorpublic void cleanUp()
cleanUp in interface CleanUpHandlercleanUp in class AbstractActor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||