@KFStep(name="TrainTestSplitMaker", category="Evaluation", toolTipText="A step that randomly splits incoming data into a training and test set", iconPath="weka/gui/knowledgeflow/icons/TrainTestSplitMaker.gif") public class TrainTestSplitMaker extends BaseStep
Constructor and Description |
---|
TrainTestSplitMaker() |
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
getIncomingConnectionTypes()
Get a list of incoming connection types that this step can accept.
|
java.util.List<java.lang.String> |
getOutgoingConnectionTypes()
Get a list of outgoing connection types that this step can produce.
|
boolean |
getPreserveOrder()
Get whether to preserve the order of the instances or not
|
java.lang.String |
getSeed()
Get the random seed to use
|
java.lang.String |
getTrainPercent()
Get the training percentage
|
Instances |
outputStructureForConnectionType(java.lang.String connectionName)
If possible, get the output structure for the named connection type as a
header-only set of instances.
|
void |
processIncoming(Data data)
Process an incoming data payload (if the step accepts incoming connections)
|
void |
setPreserveOrder(boolean preserve)
Set whether to preserve the order of the instances or not
|
void |
setSeed(java.lang.String seed)
Set the random seed to use
|
void |
setTrainPercent(java.lang.String percent)
Set the training percentage
|
void |
stepInit()
Initialize the step
|
environmentSubstitute, getCustomEditorForStep, getDefaultSettings, getInteractiveViewers, getInteractiveViewersImpls, getName, getStepManager, globalInfo, isResourceIntensive, isStopRequested, outputStructureForConnectionType, setName, setStepIsResourceIntensive, setStepManager, setStepMustRunSingleThreaded, start, stepMustRunSingleThreaded, stop
@OptionMetadata(displayName="Training percentage", description="The percentage of data to go into the training set", displayOrder=1) public void setTrainPercent(java.lang.String percent)
percent
- the training percentagepublic java.lang.String getTrainPercent()
@OptionMetadata(displayName="Random seed", description="The random seed to use when shuffling the data", displayOrder=2) public void setSeed(java.lang.String seed)
seed
- the random seed to usepublic java.lang.String getSeed()
@OptionMetadata(displayName="Preserve instance order", description="Preserve the order of the instances rather than randomly shuffling", displayOrder=3) public void setPreserveOrder(boolean preserve)
preserve
- true to preserve the order rather than randomly shuffling
firstpublic boolean getPreserveOrder()
public void stepInit() throws WekaException
WekaException
- if a problem occurspublic void processIncoming(Data data) throws WekaException
processIncoming
in interface BaseStepExtender
processIncoming
in interface Step
processIncoming
in class BaseStep
data
- the data to processWekaException
- if a problem occurspublic java.util.List<java.lang.String> getIncomingConnectionTypes()
public java.util.List<java.lang.String> getOutgoingConnectionTypes()
public Instances outputStructureForConnectionType(java.lang.String connectionName) throws WekaException
outputStructureForConnectionType
in interface Step
outputStructureForConnectionType
in class BaseStep
connectionName
- the name of the connection type to get the output
structure forWekaException
- if a problem occurs