@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 |
---|---|
List<String> |
getIncomingConnectionTypes()
Get a list of incoming connection types that this step can accept.
|
List<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
|
String |
getSeed()
Get the random seed to use
|
String |
getTrainPercent()
Get the training percentage
|
Instances |
outputStructureForConnectionType(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(String seed)
Set the random seed to use
|
void |
setTrainPercent(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(String percent)
percent
- the training percentagepublic String getTrainPercent()
@OptionMetadata(displayName="Random seed", description="The random seed to use when shuffling the data", displayOrder=2) public void setSeed(String seed)
seed
- the random seed to usepublic 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 List<String> getIncomingConnectionTypes()
public List<String> getOutgoingConnectionTypes()
public Instances outputStructureForConnectionType(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 occursCopyright © 2019 University of Waikato, Hamilton, NZ. All rights reserved.