adams.flow.source
Class WekaDataGenerator

java.lang.Object
  extended by adams.core.ConsoleObject
      extended by adams.core.option.AbstractOptionHandler
          extended by adams.flow.core.AbstractActor
              extended by adams.flow.source.AbstractSource
                  extended by adams.flow.source.WekaDataGenerator
All Implemented Interfaces:
AdditionalInformationHandler, CleanUpHandler, Debuggable, DebugOutputHandler, Destroyable, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<AbstractActor>, SizeOfHandler, Stoppable, VariableChangeListener, ErrorHandler, OutputProducer, ProvenanceSupporter, Serializable, Comparable

public class WekaDataGenerator
extends AbstractSource
implements ProvenanceSupporter

Generates artificial data using a Weka data generator.

Input/output:
- generates:

   weka.core.Instances

Valid options are:

-D (property: debug)
         If set to true, scheme may output additional info to the console.
 
-name <java.lang.String> (property: name)
         The name of the actor.
         default: DataGenerator
 
-annotation <adams.core.base.BaseString> [-annotation ...] (property: annotations)
         The annotations to attach to this actor.
 
-skip (property: skip)
         If set to true, transformation is skipped and the input token is just forwarded
          as it is.
 
-generator <weka.datagenerators.DataGenerator [options]> (property: dataGenerator)
         The data generator to use for generating the weka.core.Instances object.
         default: weka.datagenerators.classifiers.classification.Agrawal -r weka.datagenerators.classifiers.classification.Agrawal-S_1_-n_100_-F_1_-P_0.05 -S 1 -n 100 -F 1 -P 0.05
 
Default options for weka.datagenerators.classifiers.classification.Agrawal (-generator/dataGenerator):
See Weka Javadoc
 

Version:
$Revision: 4584 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
Serialized Form

Field Summary
protected  weka.datagenerators.DataGenerator m_DataGenerator
          the filter to apply.
protected  Token m_OutputToken
          the token to broadcast.
 
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
WekaDataGenerator()
           
 
Method Summary
 String dataGeneratorTipText()
          Returns the tip text for this property.
 void defineOptions()
          Adds options to the internal list of options.
protected  String doExecute()
          Executes the flow item.
 Class[] generates()
          Returns the class of objects that it generates.
 weka.datagenerators.DataGenerator getDataGenerator()
          Returns the data generator in use.
 String getQuickInfo()
          Returns a quick info about the actor, which will be displayed in the GUI.
 String globalInfo()
          Returns a string describing the object.
 boolean hasPendingOutput()
          Checks whether there is pending output to be collected after executing the flow item.
 Token output()
          Returns the generated token.
 void setDataGenerator(weka.datagenerators.DataGenerator value)
          Sets the data generator to use.
 void updateProvenance(ProvenanceContainer cont)
          Updates the provenance information in the provided container.
 
Methods inherited from class adams.flow.core.AbstractActor
annotationsTipText, backupState, canInspectOptions, canPerformSetUpCheck, cleanUp, compareTo, debug, destroy, equals, execute, findVariables, findVariables, findVariables, forceVariables, forCommandLine, forName, getAdditionalInformation, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowActors, getFullName, getName, getNextSibling, getParent, getPreviousSibling, getRoot, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, getVariables, handleError, hasErrorHandler, hasStopMessage, index, initialize, isBackedUp, isExecuted, isFinished, isHeadless, isStopped, nameTipText, performSetUpChecks, postExecute, preExecute, pruneBackup, pruneBackup, reset, restoreState, setAnnotations, setErrorHandler, setHeadless, setName, setParent, setSkip, setStopFlowOnError, setUp, setVariables, shallowCopy, shallowCopy, sizeOf, skipTipText, stopExecution, stopExecution, stopFlowOnErrorTipText, updateDetectedVariables, updatePrefix, updateVariables, variableChanged, 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

m_DataGenerator

protected weka.datagenerators.DataGenerator m_DataGenerator
the filter to apply.


m_OutputToken

protected transient Token m_OutputToken
the token to broadcast.

Constructor Detail

WekaDataGenerator

public WekaDataGenerator()
Method Detail

globalInfo

public String globalInfo()
Returns a string describing the object.

Specified by:
globalInfo in class AbstractOptionHandler
Returns:
a description suitable for displaying in the gui

defineOptions

public void defineOptions()
Adds options to the internal list of options.

Specified by:
defineOptions in interface OptionHandler
Overrides:
defineOptions in class AbstractActor

getQuickInfo

public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.

Specified by:
getQuickInfo in interface QuickInfoSupporter
Overrides:
getQuickInfo in class AbstractActor
Returns:
null if no info available, otherwise short string

setDataGenerator

public void setDataGenerator(weka.datagenerators.DataGenerator value)
Sets the data generator to use.

Parameters:
value - the data generator

getDataGenerator

public weka.datagenerators.DataGenerator getDataGenerator()
Returns the data generator in use.

Returns:
the data generator

dataGeneratorTipText

public String dataGeneratorTipText()
Returns the tip text for this property.

Returns:
tip text for this property suitable for displaying in the GUI or for listing the options.

generates

public Class[] generates()
Returns the class of objects that it generates.

Specified by:
generates in interface OutputProducer
Returns:
weka.core.Instances.class

output

public Token output()
Returns the generated token.

Specified by:
output in interface OutputProducer
Returns:
the generated token

hasPendingOutput

public boolean hasPendingOutput()
Checks whether there is pending output to be collected after executing the flow item.

Specified by:
hasPendingOutput in interface OutputProducer
Returns:
true if there is pending output

doExecute

protected String doExecute()
Executes the flow item.

Specified by:
doExecute in class AbstractActor
Returns:
null if everything is fine, otherwise error message

updateProvenance

public void updateProvenance(ProvenanceContainer cont)
Updates the provenance information in the provided container.

Specified by:
updateProvenance in interface ProvenanceSupporter
Parameters:
cont - the provenance container to update


Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.