|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
ncsa.d2k.core.modules.RootModule
ncsa.d2k.core.modules.ConfigurableModule
ncsa.d2k.core.modules.EmbeddedPipeModule
ncsa.d2k.core.modules.ExecModule
ncsa.d2k.core.modules.IOModule
ncsa.d2k.core.modules.DataPrepModule
org.imirsel.m2k.util.CreateTestAndTrainSets
A module that takes FileListWithClass objects, divides them into a
test and training set and writes the filenames
and class metadata out to the specified files. Optionally this module can replace
the String class labels with integers.
| Field Summary |
| Fields inherited from class ncsa.d2k.core.modules.ConfigurableModule |
addedInputInfo, addedInputNames, addedInputTypes, addedOutputInfo, addedOutputNames, addedOutputTypes, addPortListeners |
| Fields inherited from class ncsa.d2k.core.modules.RootModule |
alias, children, DEBUG_LEVEL, EMPTY_INPUT, ERROR_LEVEL, executionManager, FATAL_LEVEL, HAVE_INPUT, INFO_LEVEL, iPipes, iPipesIndex, iTriggers, oPipes, oPipesIndex, oTriggers, parents, pipesFullManager, stats, triggerChildren, triggerParents, WARN_LEVEL |
| Fields inherited from interface ncsa.d2k.core.modules.SystemModule |
BLOCKED_STATE, IDLE_STATE, MEDIUM, MEDIUM_RARE, MEDIUM_WELL, RARE, READY_STATE, WELL, WORKING_STATE |
| Constructor Summary | |
CreateTestAndTrainSets()
Creates a new instance of WriteFileListsToTextFile |
|
| Method Summary | |
void |
beginExecution()
Clears variable before each execution of an itinery that contains this module |
protected void |
doit()
Takes FileListWithClass objects divides them into a
test and training set and writes the filenames
and class metadata out to the specified file. |
java.lang.String |
getInputInfo(int param)
Returns a text description for the indicated input |
java.lang.String |
getInputName(int i)
Returns a text name for the given input |
java.lang.String[] |
getInputTypes()
Returns an array of strings containing the Java data types of the input. |
java.lang.String |
getModuleInfo()
Returns information about the module |
int |
getNumArraysExpected()
Returns the number of arrays to receive before outputting |
java.lang.String |
getOutputInfo(int param)
Returns a text name for the given output |
java.lang.String |
getOutputName(int i)
Returns a text name for the given output |
java.lang.String[] |
getOutputTypes()
Returns an array of strings containing the Java data types of the outputs. |
ncsa.d2k.core.modules.PropertyDescription[] |
getPropertiesDescriptions()
Returns an array of description objects for each property of the Module. |
java.lang.String |
getTestFileName()
Returns the filename that the testing FileListWithClass objects will be written to. |
java.lang.String |
getTrainFileName()
Returns the filename that the training FileListWithClass objects will be written to. |
double |
getTrainingProportion()
Returns the proportion of the data to be used for the training set |
boolean |
getUseIntegerLabels()
Returns the value of the flag that controls whether the String labels will be replaced with integers. |
java.lang.String |
getWorkingDir()
Returns the working directory that the FileListWithClass objects will be written to. |
boolean |
isReady()
Controls whether the module is able to run based on the input flags and whether any class names have been exracted from FileListWithClass objects. |
void |
setNumArraysExpected(int val)
Sets the number of arrays to receive before outputting |
void |
setTestFileName(java.lang.String file)
Sets the filename that the testing FileListWithClass objects will be written to. |
void |
setTrainFileName(java.lang.String file)
Sets the filename that the training FileListWithClass objects will be written to. |
void |
setTrainingProportion(double TrainingProportion_)
Sets the proportion of the data to be used for the training set |
void |
setUseIntegerLabels(boolean useIntLabels)
Sets the flag that controls whether the String labels will be replaced with integers. |
void |
setWorkingDir(java.lang.String path)
Sets the working directory that the FileListWithClass objects will be written to. |
| Methods inherited from class ncsa.d2k.core.modules.ExecModule |
execute, setExecutionManager |
| Methods inherited from class ncsa.d2k.core.modules.ConfigurableModule |
addAddPortListener, addInput, addInputTrigger, addOutput, addOutputTrigger, getAddedInputTypes, getAddedOutputTypes, getAddPortListeners, insertInput, insertOutput, removeAddPortListener, removeInput, removeInputTrigger, removeOutput, removeOutputTrigger, setAddedInputTypes, setInputType, setOutputType |
| Methods inherited from class ncsa.d2k.core.modules.RootModule |
activateTriggers, begin, canRun, clone, debug, debug, disconnectInputPipe, disconnectInputTriggers, disconnectOutputPipe, disconnectOutputTriggers, end, endExecution, error, error, fatal, fatal, fetchInputs, getAlias, getChildIndex, getChildMux, getChildren, getExecutionManager, getFile, getFlags, getFullPipeManager, getGuiComponent, getImage, getInputPipes, getInputPipeSize, getInputTriggers, getModuleName, getModuleStatistics, getNumInputs, getNumOutputs, getOutputCounts, getOutputPipes, getOutputPipeSize, getOutputTriggers, getParentIndex, getParentMux, getParents, getPipesFull, getPriority, getPropertyEditor, getResource, getRootName, getState, info, info, initModule, isAborting, isHead, isInputPipeConnected, isOutputPipeConnected, pullInput, pushOutput, resetInputs, setAlias, setBlocked, setD2KModulesLoggingLevel, setFlags, setFullPipeManager, setIdle, setInputPipe, setLogLevel, setModuleStatistics, setModuleStatisticsByMachine, setOutputCounts, setOutputPipe, setPipesFull, setReady, setResource, setState, setThePriority, setWorking, trigger, triggersActivated, warn, warn |
| Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CreateTestAndTrainSets()
| Method Detail |
public void setNumArraysExpected(int val)
val - number of arrays expectedpublic int getNumArraysExpected()
public ncsa.d2k.core.modules.PropertyDescription[] getPropertiesDescriptions()
public java.lang.String getTestFileName()
FileListWithClass objects will be written to.
FileListWithClass objects will be written to.public void setTestFileName(java.lang.String file)
FileListWithClass objects will be written to.
file - the filename that the testing FileListWithClass objects will be written to.public java.lang.String getTrainFileName()
FileListWithClass objects will be written to.
FileListWithClass objects will be written to.public void setTrainFileName(java.lang.String file)
FileListWithClass objects will be written to.
file - the filename that the training FileListWithClass objects will be written to.public boolean getUseIntegerLabels()
public void setUseIntegerLabels(boolean useIntLabels)
useIntLabels - the value of flag that controls whether the String labels will be replaced with integers.public void setWorkingDir(java.lang.String path)
FileListWithClass objects will be written to.
path - the path to the working directory that the FileListWithClass objects will be written to.public java.lang.String getWorkingDir()
FileListWithClass objects will be written to.
FileListWithClass objects will be written to.public void setTrainingProportion(double TrainingProportion_)
TrainingProportion_ - the proportion of the data to be used for the training setpublic double getTrainingProportion()
public boolean isReady()
FileListWithClass objects.
public void beginExecution()
protected void doit()
throws java.lang.Exception
FileListWithClass objects divides them into a
test and training set and writes the filenames
and class metadata out to the specified file. Optionally replaces
the String class labels with integers.
java.lang.Exception - If an IO error occurspublic java.lang.String getInputInfo(int param)
param - the index of the input
public java.lang.String[] getInputTypes()
public java.lang.String getInputName(int i)
i - the index of the input
public java.lang.String getModuleInfo()
public java.lang.String getOutputInfo(int param)
param - the index of the output
public java.lang.String[] getOutputTypes()
public java.lang.String getOutputName(int i)
i - the index of the output
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||